[asterisk-commits] pabelanger: branch pabelanger/non-root r278690 - in /team/pabelanger/non-root...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 22 12:15:58 CDT 2010


Author: pabelanger
Date: Thu Jul 22 12:15:54 2010
New Revision: 278690

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=278690
Log:
Looks like there will be time after all.

Added:
    team/pabelanger/non-root/build_tools/checkOS
      - copied unchanged from r278573, team/pabelanger/non-root/build_tools/checkOS
    team/pabelanger/non-root/build_tools/post_install
      - copied unchanged from r278573, team/pabelanger/non-root/build_tools/post_install
    team/pabelanger/non-root/build_tools/pre_install
      - copied unchanged from r278573, team/pabelanger/non-root/build_tools/pre_install
Modified:
    team/pabelanger/non-root/Makefile
    team/pabelanger/non-root/configure
    team/pabelanger/non-root/configure.ac
    team/pabelanger/non-root/contrib/init.d/etc_default_asterisk
    team/pabelanger/non-root/include/asterisk/autoconfig.h.in
    team/pabelanger/non-root/makeopts.in

Modified: team/pabelanger/non-root/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/non-root/Makefile?view=diff&rev=278690&r1=278689&r2=278690
==============================================================================
--- team/pabelanger/non-root/Makefile (original)
+++ team/pabelanger/non-root/Makefile Thu Jul 22 12:15:54 2010
@@ -88,6 +88,9 @@
 export GREP
 export MD5
 export WGET_EXTRA_ARGS
+export AST_USER
+export AST_GROUP
+export AST_ENABLE_ROOT
 
 # even though we could use '-include makeopts' here, use a wildcard
 # lookup anyway, so that make won't try to build makeopts if it doesn't
@@ -124,12 +127,13 @@
 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
 DEBUG=-g3
 
-ifneq ($(AST_USER),)
-  INSTALL+= -o $(AST_USER)
-endif
-
-ifneq ($(AST_GROUP),)
-  INSTALL+= -g $(AST_GROUP)
+ifneq ($(AST_ENABLE_ROOT),yes)
+  ifneq ($(AST_USER),)
+    INSTALL+= -o $(AST_USER)
+  endif
+  ifneq ($(AST_GROUP),)
+    INSTALL+= -g $(AST_GROUP)
+  endif
 endif
 
 # Define standard directories for various platforms
@@ -647,6 +651,12 @@
 		echo " WARNING WARNING WARNING" ;\
 	fi
 
+preinstall:
+	build_tools/pre_install
+
+postinstall:
+	build_tools/post_install
+
 badshell:
 ifneq ($(findstring ~,$(DESTDIR)),)
 	@echo "Your shell doesn't do ~ expansion when expected (specifically, when doing \"make install DESTDIR=~/path\")."
@@ -654,7 +664,8 @@
 	@exit 1
 endif
 
-install: badshell bininstall datafiles
+install: preinstall badshell bininstall datafiles postinstall
+
 	@if [ -x /usr/sbin/asterisk-post-install ]; then \
 		/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
 	fi

Modified: team/pabelanger/non-root/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/non-root/configure.ac?view=diff&rev=278690&r1=278689&r2=278690
==============================================================================
--- team/pabelanger/non-root/configure.ac (original)
+++ team/pabelanger/non-root/configure.ac Thu Jul 22 12:15:54 2010
@@ -536,6 +536,8 @@
 		*) AC_MSG_ERROR(bad value ${enableval} for --enable-root) ;;
 	esac], [enable_root=no])
 
+AC_DEFINE_UNQUOTED([AST_ENABLE_ROOT],"$enable_root",[Enable root installation])
+
 dnl Check for asterisk in /etc/passwd
 if test "${enable_root}" = "no" ; then
 	dnl parse /etc/passwd
@@ -548,15 +550,11 @@
 
 	if test "${astuser}" -eq 1 ; then
 		AC_MSG_RESULT(yes)
-		AST_USER="${ast_user}"
-		AC_SUBST([AST_USER])
 	else
 		AC_MSG_RESULT(no)
-		AC_MSG_NOTICE(*** Unable to install Asterisk using ${ast_user} user permission; confirm the user exists.)
-		AC_MSG_NOTICE(*** Please run the 'configure' script with the '--enable-root' parameter option or create)
-		AC_MSG_NOTICE(*** the appropiate user.)
-		exit 1
 	fi
+	AST_USER="${ast_user}"
+	AC_SUBST([AST_USER])
 
 	AC_MSG_CHECKING([for ${ast_group} group])
 	if test "x$GETENT" != "x:" ; then
@@ -567,16 +565,14 @@
 
 	if test "${astgroup}" -eq 1 ; then
 		AC_MSG_RESULT(yes)
-		AST_GROUP="${ast_group}"
-		AC_SUBST([AST_GROUP])
 	else
 		AC_MSG_RESULT(no)
-		AC_MSG_NOTICE(*** Unable to install Asterisk using ${ast_group} group permission; confirm the group exists.)
-		AC_MSG_NOTICE(*** Please run the 'configure' script with the '--enable-root' parameter option or create)
-		AC_MSG_NOTICE(*** the appropiate group.)
-		exit 1
 	fi
-fi
+	AST_GROUP="${ast_group}"
+	AC_SUBST([AST_GROUP])
+fi
+AST_ENABLE_ROOT="${enable_root}"
+AC_SUBST([AST_ENABLE_ROOT])
 
 # https support (in main/http.c) uses funopen on BSD systems,
 # fopencookie on linux

Modified: team/pabelanger/non-root/contrib/init.d/etc_default_asterisk
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/non-root/contrib/init.d/etc_default_asterisk?view=diff&rev=278690&r1=278689&r2=278690
==============================================================================
--- team/pabelanger/non-root/contrib/init.d/etc_default_asterisk (original)
+++ team/pabelanger/non-root/contrib/init.d/etc_default_asterisk Thu Jul 22 12:15:54 2010
@@ -39,4 +39,3 @@
 # Start all recordings into a temporary directory, before moving them to
 # their final location.
 #TEMPRECORDINGLOCATION=yes
-

Modified: team/pabelanger/non-root/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/non-root/include/asterisk/autoconfig.h.in?view=diff&rev=278690&r1=278689&r2=278690
==============================================================================
--- team/pabelanger/non-root/include/asterisk/autoconfig.h.in (original)
+++ team/pabelanger/non-root/include/asterisk/autoconfig.h.in Thu Jul 22 12:15:54 2010
@@ -6,6 +6,9 @@
 #include "asterisk/buildopts.h"
 
 
+
+/* Enable root installation */
+#undef AST_ENABLE_ROOT
 
 /* name of the Asterisk group */
 #undef AST_GROUP

Modified: team/pabelanger/non-root/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/non-root/makeopts.in?view=diff&rev=278690&r1=278689&r2=278690
==============================================================================
--- team/pabelanger/non-root/makeopts.in (original)
+++ team/pabelanger/non-root/makeopts.in Thu Jul 22 12:15:54 2010
@@ -86,6 +86,7 @@
 
 AST_USER=@AST_USER@
 AST_GROUP=@AST_GROUP@
+AST_ENABLE_ROOT=@AST_ENABLE_ROOT@
 
 ALSA_INCLUDE=@ALSA_INCLUDE@
 ALSA_LIB=@ALSA_LIB@




More information about the asterisk-commits mailing list