[prev in list] [next in list] [prev in thread] [next in thread] 

List:       oprofile-list
Subject:    Re: [PATCH 08/10] oprofile build: adding config option to disable
From:       Maynard Johnson <maynardj () us ! ibm ! com>
Date:       2009-12-07 23:48:34
Message-ID: 4B1D9452.6050806 () us ! ibm ! com
[Download RAW message or body]

Robert Richter wrote:
> For testing and building binary packages on a build server it is
> annoying to always get a warnig the user oprofile does not exists on
> this system. There are two checks, during configuration and while
> running make. This patch adds an option what allows building packages
> without all this checks:
Patch committed.

-Maynard
> 
>  ./confiure --disable-account-check ...
> 
> Signed-off-by: Robert Richter <robert.richter@amd.com>
> ---
>  ChangeLog          |    5 +++++
>  agents/Makefile.am |   10 ++++++++--
>  configure.in       |   12 ++++++++++--
>  3 files changed, 23 insertions(+), 4 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index 5456ac1..6fe6e5e 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,5 +1,10 @@
>  2009-08-11  Robert Richter <robert.richter@amd.com>
> 
> +	* agents/Makefile.am:
> +	* configure.in: adding config option to disable oprofile user check
> +
> +2009-08-11  Robert Richter <robert.richter@amd.com>
> +
>  	* autogen.sh: create copies with libtoolize instead of symlinks
> 
>  2009-08-11  Robert Richter <robert.richter@amd.com>
> diff --git a/agents/Makefile.am b/agents/Makefile.am
> index 10325a1..c049fa7 100644
> --- a/agents/Makefile.am
> +++ b/agents/Makefile.am
> @@ -9,7 +9,13 @@ if BUILD_JVMPI_AGENT
>  SUBDIRS +=      jvmpi
>  endif
> 
> -install-exec-hook:
> +INSTALL_EXEC_HOOK =
> +
> +if CHECK_ACCOUNT
> +INSTALL_EXEC_HOOK += __install-exec-hook
> +endif
> +
> +__install-exec-hook:
>  	@getent passwd oprofile >/dev/null || ( \
>  	echo "****************************************************************" ; \
>  	echo "*    WARNING:" ; \
> @@ -27,4 +33,4 @@ install-exec-hook:
>  	echo "*      The special user 'oprofile' must have the default group set to 'oprofile'." ; \
>  	echo "****************************************************************") ;
> 
> -
> +install-exec-hook: $(INSTALL_EXEC_HOOK)
> diff --git a/configure.in b/configure.in
> index 5de0db0..82b5061 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -196,6 +196,12 @@ if test "$enable_optimization" = "no"; then
>  	CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'`
>  fi
> 
> +AC_ARG_ENABLE(account-check,
> +	[  --disable-account-check     disable account check (default is enabled)],
> +	enable_account_check=$enableval, enable_account_check=yes)
> +
> +AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes")
> +
>  AC_SUBST(OP_CFLAGS)
>  AC_SUBST(OP_CXXFLAGS)
> 
> @@ -272,8 +278,10 @@ if test -z "$QT_LIB"; then
>  	echo "Warning: a working Qt not found; no GUI will be built"
>  fi
> 
> -if test "`getent passwd oprofile 2>/dev/null`" == "" || \
> -   test "`getent group oprofile 2>/dev/null`" == ""; then
> +if ! test "x$enable_account_check" = "xyes"; then
> +	:
> +elif test "`getent passwd oprofile 2>/dev/null`" == "" || \
> +     test "`getent group oprofile 2>/dev/null`" == ""; then
>  	if test `id -u` != "0"; then
>  		echo "Warning: The user account 'oprofile:oprofile' does not exist on the system."
>  		echo "         To profile JITed code, this special user account must exist."


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic