diff options
author | joerg <joerg@pkgsrc.org> | 2015-04-21 17:01:55 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-04-21 17:01:55 +0000 |
commit | 35a132a09c83d1babb42e2d1dadd9485f6be3026 (patch) | |
tree | b96ffd56a8517f5545b97d972b4634bc98c97669 | |
parent | b0f93e0a761df1bb33de385c3075dee3eb41180d (diff) | |
download | pkgsrc-35a132a09c83d1babb42e2d1dadd9485f6be3026.tar.gz |
Add a new ulimit modifier for cputime. Support raising limits for
package creation.
There are very few things in pkgsrc that needs more than one hour per
process on decently fast hardware, so setting that as (soft) limit for
bulk builds avoids the infinite loops seen in some other packages. There
are a few select exceptions, i.e. flightgear-data needs more than one
hour for pkg_create when using xz. This flag allows selectively giving
those places more time without wasting resources in the broken cases.
-rw-r--r-- | mk/help/ulimit.help | 3 | ||||
-rw-r--r-- | mk/pkgformat/pkg/package.mk | 4 | ||||
-rw-r--r-- | mk/platform/DragonFly.mk | 3 | ||||
-rw-r--r-- | mk/platform/FreeBSD.mk | 3 | ||||
-rw-r--r-- | mk/platform/GNUkFreeBSD.mk | 3 | ||||
-rw-r--r-- | mk/platform/Linux.mk | 3 | ||||
-rw-r--r-- | mk/platform/MirBSD.mk | 3 | ||||
-rw-r--r-- | mk/platform/NetBSD.mk | 3 | ||||
-rw-r--r-- | mk/platform/OpenBSD.mk | 3 |
9 files changed, 18 insertions, 10 deletions
diff --git a/mk/help/ulimit.help b/mk/help/ulimit.help index 12cdc519e17..9e3828fcf58 100644 --- a/mk/help/ulimit.help +++ b/mk/help/ulimit.help @@ -1,4 +1,4 @@ -# $NetBSD: ulimit.help,v 1.1 2009/05/10 16:10:18 rillig Exp $ +# $NetBSD: ulimit.help,v 1.2 2015/04/21 17:01:55 joerg Exp $ # # UNLIMIT_RESOURCES @@ -9,5 +9,6 @@ # * datasize # * stacksize # * memorysize +# * cputime # # Keywords: ulimit unlimit memory ENOMEM diff --git a/mk/pkgformat/pkg/package.mk b/mk/pkgformat/pkg/package.mk index 9247c9471c1..0de336e6e24 100644 --- a/mk/pkgformat/pkg/package.mk +++ b/mk/pkgformat/pkg/package.mk @@ -1,4 +1,4 @@ -# $NetBSD: package.mk,v 1.9 2015/02/16 10:50:33 jperkin Exp $ +# $NetBSD: package.mk,v 1.10 2015/04/21 17:01:56 joerg Exp $ .if defined(PKG_SUFX) WARNINGS+= "PKG_SUFX is deprecated, please use PKG_COMPRESSION" @@ -72,7 +72,7 @@ _PKG_ARGS_PACKAGE+= -u ${REAL_ROOT_USER} -g ${REAL_ROOT_GROUP} ${STAGE_PKGFILE}: ${_CONTENTS_TARGETS} ${RUN} ${MKDIR} ${.TARGET:H} @${STEP_MSG} "Creating binary package ${.TARGET}" - ${RUN} tmpname=${.TARGET:S,${PKG_SUFX}$,.tmp${PKG_SUFX},}; \ + ${RUN} ${_ULIMIT_CMD} tmpname=${.TARGET:S,${PKG_SUFX}$,.tmp${PKG_SUFX},}; \ if ${PKG_CREATE} ${_PKG_ARGS_PACKAGE} "$$tmpname"; then \ ${MV} -f "$$tmpname" ${.TARGET}; \ else \ diff --git a/mk/platform/DragonFly.mk b/mk/platform/DragonFly.mk index bb2d74561d3..2b985585170 100644 --- a/mk/platform/DragonFly.mk +++ b/mk/platform/DragonFly.mk @@ -1,4 +1,4 @@ -# $NetBSD: DragonFly.mk,v 1.45 2014/07/25 23:40:01 ryoon Exp $ +# $NetBSD: DragonFly.mk,v 1.46 2015/04/21 17:01:56 joerg Exp $ # # Variable definitions for the DragonFly operating system. @@ -23,6 +23,7 @@ ROOT_GROUP?= wheel ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d` ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s` ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m` +ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t` _OPSYS_EMULDIR.linux= /compat/linux diff --git a/mk/platform/FreeBSD.mk b/mk/platform/FreeBSD.mk index 851ffcaa051..9ab4ba7c765 100644 --- a/mk/platform/FreeBSD.mk +++ b/mk/platform/FreeBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: FreeBSD.mk,v 1.30 2013/04/28 12:53:56 obache Exp $ +# $NetBSD: FreeBSD.mk,v 1.31 2015/04/21 17:01:56 joerg Exp $ # # Variable definitions for the FreeBSD operating system. @@ -28,6 +28,7 @@ ROOT_GROUP?= wheel ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d` ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s` ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m` +ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t` _OPSYS_EMULDIR.freebsd= # empty _OPSYS_EMULDIR.linux= /compat/linux diff --git a/mk/platform/GNUkFreeBSD.mk b/mk/platform/GNUkFreeBSD.mk index 028c5e5c16d..919b05b4f49 100644 --- a/mk/platform/GNUkFreeBSD.mk +++ b/mk/platform/GNUkFreeBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: GNUkFreeBSD.mk,v 1.2 2014/02/19 17:20:23 jperkin Exp $ +# $NetBSD: GNUkFreeBSD.mk,v 1.3 2015/04/21 17:01:56 joerg Exp $ # # Variable definitions for the Debian GNU/kFreeBSD operating system. @@ -28,6 +28,7 @@ SERIAL_DEVICES?= /dev/null ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d` ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s` ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m` +ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t` USERADD?= /usr/sbin/useradd .if !empty(MACHINE_ARCH:Mx86_64) diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk index 4e30dca8074..a966f39c983 100644 --- a/mk/platform/Linux.mk +++ b/mk/platform/Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: Linux.mk,v 1.60 2014/03/07 15:03:15 jperkin Exp $ +# $NetBSD: Linux.mk,v 1.61 2015/04/21 17:01:56 joerg Exp $ # # Variable definitions for the Linux operating system. @@ -42,6 +42,7 @@ SERIAL_DEVICES?= /dev/null ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d` ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s` ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m` +ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t` USERADD?= /usr/sbin/useradd _OPSYS_EMULDIR.linux= # empty diff --git a/mk/platform/MirBSD.mk b/mk/platform/MirBSD.mk index 98230240f3b..2d2d7d987df 100644 --- a/mk/platform/MirBSD.mk +++ b/mk/platform/MirBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: MirBSD.mk,v 1.10 2014/03/19 16:44:08 bsiegert Exp $ +# $NetBSD: MirBSD.mk,v 1.11 2015/04/21 17:01:56 joerg Exp $ # # Variable definitions for the MirOS BSD operating system. @@ -26,6 +26,7 @@ ROOT_GROUP?= wheel ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d` ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s` ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m` +ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t` X11_TYPE?= modular diff --git a/mk/platform/NetBSD.mk b/mk/platform/NetBSD.mk index 91940de5abb..eaaad4fd591 100644 --- a/mk/platform/NetBSD.mk +++ b/mk/platform/NetBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.mk,v 1.40 2014/09/02 16:13:27 gdt Exp $ +# $NetBSD: NetBSD.mk,v 1.41 2015/04/21 17:01:56 joerg Exp $ # # Variable definitions for the NetBSD operating system. @@ -40,6 +40,7 @@ ROOT_GROUP?= wheel ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d` ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s` ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m` +ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t` # Native X11 is only supported on NetBSD-5 and later. # On NetBSD-5, native X11 has enough issues that we default diff --git a/mk/platform/OpenBSD.mk b/mk/platform/OpenBSD.mk index c1e8a5d3910..04faac7bd09 100644 --- a/mk/platform/OpenBSD.mk +++ b/mk/platform/OpenBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: OpenBSD.mk,v 1.37 2013/04/28 12:53:56 obache Exp $ +# $NetBSD: OpenBSD.mk,v 1.38 2015/04/21 17:01:56 joerg Exp $ # # Variable definitions for the OpenBSD operating system. @@ -35,6 +35,7 @@ ROOT_GROUP?= wheel ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d` ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s` ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m` +ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t` X11_TYPE?= native |