[tor-commits] [flashproxy/master] install secret file directly with the right perms, and move examples back to docdir

infinity0 at torproject.org infinity0 at torproject.org
Mon May 19 13:53:24 UTC 2014


commit 6c505e856dfdd5c0398b1012cd6a309b38b94ccc
Author: Ximin Luo <infinity0 at torproject.org>
Date:   Mon May 19 14:46:06 2014 +0100

    install secret file directly with the right perms, and move examples back to docdir
---
 facilitator/Makefile.am |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/facilitator/Makefile.am b/facilitator/Makefile.am
index 268fec4..e16ea37 100644
--- a/facilitator/Makefile.am
+++ b/facilitator/Makefile.am
@@ -7,7 +7,7 @@ cgibindir = @cgibindir@
 # unfortunately sysvinit does not support having initscripts in /usr/local/etc
 # yet, so we have to hard code a path here. :(
 initscriptdir = /etc/init.d
-exampledir = $(pkgdatadir)/examples
+exampledir = $(docdir)/examples
 appenginedir = $(pkgdatadir)/appengine
 pkgconfdir = $(sysconfdir)/flashproxy
 appengineconfdir = $(pkgconfdir)/reg-appspot
@@ -57,6 +57,12 @@ examples/fp-facilitator.conf: examples/fp-facilitator.conf.in Makefile
 pylint: $(dist_bin_SCRIPTS)
 	pylint -E $^
 
+install-data-local:
+	$(INSTALL_DATA) -m 600 -t $(DESTDIR)$(pkgconfdir) $(srcdir)/examples/reg-email.pass
+
+uninstall-local:
+	rm $(DESTDIR)$(pkgconfdir)/reg-email.pass
+
 # The {pre,post}-{install,remove} targets are just given as reference, and
 # ought to be separate scripts as part of your distro's installation process.
 # They are intentionally not linked to the install target since they require
@@ -107,12 +113,9 @@ install-secrets:
 	  install -m 600 /dev/null ${pkgconfdir}/reg-daemon.key && \
 	  openssl genrsa 2048 | tee ${pkgconfdir}/reg-daemon.key | \
 	  openssl rsa -pubout > ${pkgconfdir}/reg-daemon.pub; }
-	test -f ${pkgconfdir}/reg-email.pass || { \
-	  install -m 600 /dev/null ${pkgconfdir}/reg-email.pass && \
-	  cat ${exampledir}/reg-email.pass > ${pkgconfdir}/reg-email.pass; }
 
 remove-secrets:
-	for i in reg-daemon.key reg-daemon.pub reg-email.pass; do \
+	for i in reg-daemon.key reg-daemon.pub; do \
 	  rm -f ${pkgconfdir}/$$i; \
 	done
 





More information about the tor-commits mailing list