pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45274: mk/platform/Linux.mk _OPSYS_MAX_CMDLEN_CMD fix



>Number:         45274
>Category:       pkg
>Synopsis:       mk/platform/Linux.mk _OPSYS_MAX_CMDLEN_CMD fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 19 13:50:01 +0000 2011
>Originator:     Emmanuel Kasper
>Release:        
>Organization:
ouam
>Environment:
Linux leonard 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64 
GNU/Linux

>Description:
While having a look at how to improve pkgsrc on my linux computers, I noticed 
the following in mk/platform/Linux.mk

# FIXME: Adjust to work on this system and enable the lines below.
#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax

On Linux and ( So far I have understood,  any POSIX platform ) the proper way 
to get this to use
/usr/bin/getconf ARG_MAX

( see http://pubs.opengroup.org/onlinepubs/007908799/xcu/getconf.html 
"operands" and http://pubs.opengroup.org/onlinepubs/007908799/xsh/sysconf.html )

I bootstrap pkgsrc and built editors/nano on Linux with the following patch and 
it all went fine !
>How-To-Repeat:

>Fix:
--- Linux.mk.orig       2011-08-19 15:08:46.000000000 +0200
+++ Linux.mk    2011-08-19 15:19:05.000000000 +0200
@@ -94,8 +94,7 @@
 
 # check for maximum command line length and set it in configure's environment,
 # to avoid a test required by the libtool script that takes forever.
-# FIXME: Adjust to work on this system and enable the lines below.
-#_OPSYS_MAX_CMDLEN_CMD=        /sbin/sysctl -n kern.argmax
+_OPSYS_MAX_CMDLEN_CMD= /usr/bin/getconf ARG_MAX
 
 .if (${MACHINE_ARCH} == "x86_64")
 ABI?=  64




Home | Main Index | Thread Index | Old Index