RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ configure.ac macros.in

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 10 Apr 2008 - 13:41:26 CEST
Message-Id: <ABCC2A72-A9C4-4F38-A014-801ADA5D13EF@mac.com>
And the feeping creaturism starts to try to accomodate automatic  
detection for
a functionality that isn't needed or used by rpmbuild itself.

And what happens in a VM, that sometimes has one and sometimes several
cpus's configured at run time?

73 de Jeff

On Apr 10, 2008, at 5:23 AM, Anders F. Björklund wrote:

>   RPM Package Manager, CVS Repository
>   http://rpm5.org/cvs/
>    
> ______________________________________________________________________ 
> ______
>
>   Server: rpm5.org                         Name:   Anders F. Björklund
>   Root:   /v/rpm/cvs                       Email:  afb@rpm5.org
>   Module: rpm                              Date:   10-Apr-2008  
> 11:23:29
>   Branch: HEAD                             Handle: 2008041009232800
>
>   Modified files:
>     rpm                     configure.ac macros.in
>
>   Log:
>     move NCPUS to configure, it is platform specific
>
>   Summary:
>     Revision    Changes     Path
>     2.291       +11 -0      rpm/configure.ac
>     1.244       +2  -4      rpm/macros.in
>    
> ______________________________________________________________________ 
> ______
>
>   patch -p0 <<'@@ .'
>   Index: rpm/configure.ac
>    
> ====================================================================== 
> ======
>   $ cvs diff -u -r2.290 -r2.291 configure.ac
>   --- rpm/configure.ac	6 Apr 2008 08:12:39 -0000	2.290
>   +++ rpm/configure.ac	10 Apr 2008 09:23:28 -0000	2.291
>   @@ -1282,6 +1282,17 @@
>    AC_SUBST(RPMGROUP)
>    AC_SUBST(RPMGID)
>
>   +dnl # determine number of CPUs command
>   +AC_MSG_CHECKING([how to determine NCPUS])
>   +NCPUS_COMMAND="echo 1"
>   +case "$host" in
>   +    *-*-linux* ) NCPUS_COMMAND="/usr/bin/getconf  
> _NPROCESSORS_ONLN" ;;
>   +    *-*-darwin* ) NCPUS_COMMAND="/usr/sbin/sysctl -n hw.ncpu" ;;
>   +esac
>   +NCPUS_RESULT=`$NCPUS_COMMAND`
>   +AC_MSG_RESULT([`$NCPUS_COMMAND` ($NCPUS_RESULT)])
>   +AC_SUBST(NCPUS_COMMAND)
>   +
>    dnl # support for versioned installation paths
>    AC_ARG_WITH(
>        [path-versioned],
>   @@ .
>   patch -p0 <<'@@ .'
>   Index: rpm/macros.in
>    
> ====================================================================== 
> ======
>   $ cvs diff -u -r1.243 -r1.244 macros.in
>   --- rpm/macros.in	10 Apr 2008 09:00:03 -0000	1.243
>   +++ rpm/macros.in	10 Apr 2008 09:23:28 -0000	1.244
>   @@ -1,7 +1,7 @@
>    #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
>    # \verbatim
>    #
>   -# $Id: macros.in,v 1.243 2008/04/10 09:00:03 pkarlsen Exp $
>   +# $Id: macros.in,v 1.244 2008/04/10 09:23:28 afb Exp $
>    #
>    # This is a global RPM configuration file. All changes made here  
> will
>    # be lost when the rpm package is upgraded. Any per-system  
> configuration
>   @@ -1290,9 +1290,7 @@
>
>    %_initrddir		%{_sysconfdir}/rc.d/init.d
>    %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
>   -	&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/ 
> null`"; \\\
>   -	[ -z "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS="`/usr/sbin/sysctl  
> -n hw.ncpu 2> /dev/null`"; \\\
>   -	[ -z "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS="1"; \\\
>   +	&& RPM_BUILD_NCPUS="`@NCPUS_COMMAND@`"; \\\
>    	[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
>
>     
> #---------------------------------------------------------------------
>   @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-cvs@rpm5.org
Received on Thu Apr 10 13:41:53 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.