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

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:


  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
# 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 \
CTRL_SBIN_SCRIPTS = mailmanproxy
# These scripts installed setuid, with sudo.
SETUID_SBIN_SCRIPTS = addmmuser delmmuser addmmlist delmmlist \
setmmlistmembers setmmpasswd mmlistmembership \
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
Supports Markdown
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