Commit bc269f9a authored by Leigh B. Stoller's avatar Leigh B. Stoller

Makefile Whacking! Try to deal with the problem caused by the delay

  between when something is installed and when post-install runs. Short
  of a global lock (which we probably need anyway someday), my solution
  is this. In your makefiles, add these variables before the line that
  has the include of $(TESTBED_SRCDIR)/GNUmakerules:

  	SETUID_BIN_SCRIPTS   =
  	SETUID_SBIN_SCRIPTS  =

  I have added three new rules to GNUmakerules that look like this:

  	$(addprefix $(SBINDIR)/, $(SETUID_SBIN_SCRIPTS)): $(SBINDIR)/%: %
  		echo "Installing (setuid) $<"
  		-mkdir -p $(INSTALL_SBINDIR)
  		$(SUDO) $(INSTALL) -o root -m 4755 $< $@

  Yep, your eyes ain't lying to you; use sudo to run the target so that
  install does the right thing (which is that the old file is not
  replaced until the new one has the proper attributes on it).

  Note that post-install is still needed for the initial install, but
  should no longer be needed for day to day installs since all that other
  stuff post-install does is mkdir/chmod on directories.
parent 7590f9c5
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -18,9 +18,15 @@ LIBEXEC_SCRIPTS = webaddmmlist webdelmmlist websetmmpasswd mmxlogin \
webmmlistmembership
CTRL_LIBEXEC_SCRIPTS = genaliases
CTRL_LIB_FILES = mmscript.py
CTRL_SBIN_SCRIPTS = mailmanproxy
# These scripts installed setuid, with sudo.
SETUID_BIN_SCRIPTS =
SETUID_SBIN_SCRIPTS = addmmuser delmmuser addmmlist delmmlist \
setmmlistmembers setmmpasswd mmlistmembership \
mmmodifymember
SETUID_LIBX_SCRIPTS = mmxlogin
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment