aboutsummaryrefslogtreecommitdiff
path: root/rcynic
diff options
context:
space:
mode:
Diffstat (limited to 'rcynic')
-rw-r--r--rcynic/Makefile.in42
-rw-r--r--rcynic/rules.darwin.mk2
-rw-r--r--rcynic/rules.freebsd.mk2
-rw-r--r--rcynic/rules.linux.mk2
-rw-r--r--rcynic/rules.unknown.mk2
5 files changed, 22 insertions, 28 deletions
diff --git a/rcynic/Makefile.in b/rcynic/Makefile.in
index 4950e05b..9e07a74c 100644
--- a/rcynic/Makefile.in
+++ b/rcynic/Makefile.in
@@ -143,56 +143,50 @@ static-rsync/rsync:
@echo "Building static rsync for use in chroot jail"
cd static-rsync; ${MAKE} all
-install: ${BIN} ${RSYNC_INSTALL_TARGETS}
+install: all ${RCYNIC_INSTALL_TARGETS}
-# From here down is a long list of rules to handle installation on
-# various platforms. This used to be a set of nasty shell scripts,
-# now it's nasty Makefile autoconf AC_SUBST_FILE snippets.
-#
-# Still working out details here.
+install-always: \
+ install-directories install-rcynic install-scripts install-rcynic-conf install-crontab
-create-rcynic-directories: ${RCYNIC_DIRS}
+install-postconf: \
+ install-rcynic-user-and-group install-directory-ownership
-${RCYNIC_DIRS}:
- mkdir -p -v -555 $@
+install-jailed: \
+ install-static-rsync install-shared-libraries install-rc-scripts
-postconf-rcynic-directories: ${RCYNIC_DATA_DIR} ${RCYNIC_RPKI_RTR_DIR}
- chown ${RCYNIC_USER}:${RCYNIC_GROUP} ${RCYNIC_DATA_DIR} ${RCYNIC_RPKI_RTR_DIR}
+install-directories: ${RCYNIC_DIRS}
-# Old script only installed trust anchors if rcynic.conf was missing.
-# Haven't decided yet whether we want to preserve that behavior.
+${RCYNIC_DIRS}:
+ ${INSTALL} -v -d $@
-install-rcynic-trust-anchors: ${RCYNIC_TA_DIR}
- @cd sample-trust-anchors; \
- for i in *.tal; \
- do \
- ${INSTALL} -C -p -m 444 "$$i" "${RCYNIC_TA_DIR}/$$i"; \
- done
+install-directory-ownership: ${RCYNIC_DATA_DIR} ${RCYNIC_RPKI_RTR_DIR}
+ chown ${RCYNIC_USER}:${RCYNIC_GROUP} ${RCYNIC_DATA_DIR} ${RCYNIC_RPKI_RTR_DIR}
install-rcynic-conf: ${RCYNIC_CONF_FILE}
${RCYNIC_CONF_FILE}:
@echo Found no ${RCYNIC_CONF_FILE}, creating sample config. You might want to edit this.
- @echo > $@.tmp '# Sample rcynic configuration file. See documentation for details.'
+ @echo > $@.tmp '# Basic rcynic configuration file with default trust anchors.'
+ @echo >>$@.tmp '# See documentation for details.'
@echo >>$@.tmp ''
@echo >>$@.tmp '[rcynic]'
@echo >>$@.tmp 'rsync-program = ${RCYNIC_CONF_RSYNC}'
@echo >>$@.tmp 'authenticated = ${RCYNIC_CONF_DATA}/authenticated'
@echo >>$@.tmp 'unauthenticated = ${RCYNIC_CONF_DATA}/unauthenticated'
- @echo >>$@.tmp 'lockfile = ${RCYNIC_CONF_DATA}/lock'
@echo >>$@.tmp 'xml-summary = ${RCYNIC_CONF_DATA}/rcynic.xml'
@echo >>$@.tmp 'jitter = 600'
@echo >>$@.tmp 'use-syslog = true'
@echo >>$@.tmp 'log-level = log_usage_err'
- @cd ${RCYNIC_TA_DIR}; \
+ @cd sample-trust-anchors; \
j=1; \
for i in *.tal; \
do \
+ ${INSTALL} -C -p -m 444 "$$i" "${RCYNIC_TA_DIR}/$$i"; \
echo >>$@ "trust-anchor-locator.$$j = ${RCYNIC_CONF_TA_DIR}/$$i"; \
j=$$((j+1)); \
done
@chmod 444 $@.tmp
- @mv $@.tmp $@
+ @mv -f $@.tmp $@
install-rcynic: ${RCYNIC_BIN_RCYNIC}
@@ -231,7 +225,7 @@ ${bindir}/validation_status: validation_status
# Not sure we want this, test it both ways I guess
#.PHONY: .FORCE
-configure-rcynic-crontab: .FORCE
+install-crontab: .FORCE
@echo "Setting up ${RCYNIC_CRON_USER}'s crontab to run rcynic-cron script
@crontab -l -u ${RCYNIC_CRON_USER} 2>/dev/null | \
${AWK} -v t=`hexdump -n 2 -e '"%u\n"' /dev/random` '\
diff --git a/rcynic/rules.darwin.mk b/rcynic/rules.darwin.mk
index bbbdf00f..998b5f54 100644
--- a/rcynic/rules.darwin.mk
+++ b/rcynic/rules.darwin.mk
@@ -1,6 +1,6 @@
# $Id$
-create-rcynic-user-and-group: .FORCE
+install-user-and-group: .FORCE
@if /usr/bin/dscl . -read "/Groups/${RCYNIC_GROUP}" >/dev/null 2>&1; \
then \
echo "You already have a group \"${RCYNIC_GROUP}\", so I will use it."; \
diff --git a/rcynic/rules.freebsd.mk b/rcynic/rules.freebsd.mk
index e99a2118..dd9e0a01 100644
--- a/rcynic/rules.freebsd.mk
+++ b/rcynic/rules.freebsd.mk
@@ -1,6 +1,6 @@
# $Id$
-create-rcynic-user-and-group: .FORCE
+install-user-and-group: .FORCE
if /usr/sbin/pw groupshow "${RCYNIC_GROUP}" 2>/dev/null; \
then \
echo "You already have a group \"${RCYNIC_GROUP}\", so I will use it."; \
diff --git a/rcynic/rules.linux.mk b/rcynic/rules.linux.mk
index 750ee429..82461990 100644
--- a/rcynic/rules.linux.mk
+++ b/rcynic/rules.linux.mk
@@ -1,6 +1,6 @@
# $Id$
-create-rcynic-user-and-group: .FORCE
+install-user-and-group: .FORCE
if ${AWK} -F: 'BEGIN {status = 1} $$1 == ${RCYNIC_GROUP} {status = 0} END {exit status}' /etc/group; \
then \
echo "You already have a group \"${RCYNIC_GROUP}\", so I will use it."; \
diff --git a/rcynic/rules.unknown.mk b/rcynic/rules.unknown.mk
index 1ee63a63..6ce3ea18 100644
--- a/rcynic/rules.unknown.mk
+++ b/rcynic/rules.unknown.mk
@@ -1,4 +1,4 @@
# $Id$
-create-rcynic-user-and-group install-shared-libraries: .FORCE
+install-user-and-group install-shared-libraries install-rc-scripts: .FORCE
@echo "Don't know how to make $@ on this platform"; exit 1