[Rt-commit] rt branch, 4.0/install-etc-upgrade, created. rt-4.0.11rc1-28-gefaf506

Thomas Sibley trs at bestpractical.com
Mon Apr 8 17:22:08 EDT 2013


The branch, 4.0/install-etc-upgrade has been created
        at  efaf506bfa077ee07ac0cfa4b4e3bc8cad278bbf (commit)

- Log -----------------------------------------------------------------
commit efaf506bfa077ee07ac0cfa4b4e3bc8cad278bbf
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Apr 8 14:16:59 2013 -0700

    Install etc/upgrade/ for the benefit of rt-setup-database
    
    Without etc/upgrade/ only some actions that sbin/rt-setup-database
    provides are available from an install; the rest need to be run from an
    RT tarball or git checkout.  It's more annoying to setup a new RT
    instance for an upgrade, test it, and then do the cutover when you can't
    run `sbin/rt-setup-database --action upgrade` repeatedly from your
    known-good config and install.
    
    We install etc/acl.* and etc/schema.* already, so there's precedent for
    installing schema and ACL data files.

diff --git a/Makefile.in b/Makefile.in
index 46905de..9d3d4e9 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -298,6 +298,13 @@ fixperms:
 	# Make the system binaries executable also
 	cd $(DESTDIR)$(RT_SBIN_PATH) && ( chmod 0755 $(SYSTEM_BINARIES) ; chown $(BIN_OWNER) $(SYSTEM_BINARIES);  chgrp $(RTGROUP) $(SYSTEM_BINARIES))
 
+	# Make upgrade scripts executable if they are in the source.
+	#
+	# Note that we use the deprecated (by GNU/POSIX find) -perm +0NNN syntax
+	# instead of -perm /0NNN since BSD find doesn't support the latter.
+	( cd etc/upgrade && find . -type f -not -name '*.in' -perm +0111 -print ) | while read file ; do \
+		chmod a+x "$(DESTDIR)$(RT_ETC_PATH)/upgrade/$$file" ; \
+	done
 
 	# Make the web ui readable by all. 
 	chmod -R  u+rwX,go-w,go+rX 	$(DESTDIR)$(MASON_HTML_PATH) \
@@ -426,6 +433,13 @@ etc-install:
 @COMMENT_INPLACE_LAYOUT@	for file in $(ETC_FILES) ; do \
 @COMMENT_INPLACE_LAYOUT@	    $(INSTALL) -m 0644 "etc/$$file" "$(DESTDIR)$(RT_ETC_PATH)/" ; \
 @COMMENT_INPLACE_LAYOUT@	done
+ at COMMENT_INPLACE_LAYOUT@	[ -d $(DESTDIR)$(RT_ETC_PATH)/upgrade ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_ETC_PATH)/upgrade
+ at COMMENT_INPLACE_LAYOUT@	-( cd etc/upgrade && find . -type d -print ) | while read dir ; do \
+ at COMMENT_INPLACE_LAYOUT@	    $(INSTALL) -m 0755 -d "$(DESTDIR)$(RT_ETC_PATH)/upgrade/$$dir" ; \
+ at COMMENT_INPLACE_LAYOUT@	done
+ at COMMENT_INPLACE_LAYOUT@	-( cd etc/upgrade && find . -type f -not -name '*.in' -print ) | while read file ; do \
+ at COMMENT_INPLACE_LAYOUT@	    $(INSTALL) -m 0644 "etc/upgrade/$$file" "$(DESTDIR)$(RT_ETC_PATH)/upgrade/$$file" ; \
+ at COMMENT_INPLACE_LAYOUT@	done
 
 
 sbin-install:

-----------------------------------------------------------------------


More information about the Rt-commit mailing list