pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Add a new ulimit modifier for cputime. Support rais...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fd8b2d38e0fb
branches: trunk
changeset: 650339:fd8b2d38e0fb
user: joerg <joerg%pkgsrc.org@localhost>
date: Tue Apr 21 17:01:55 2015 +0000
description:
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.
diffstat:
mk/help/ulimit.help | 3 ++-
mk/pkgformat/pkg/package.mk | 4 ++--
mk/platform/DragonFly.mk | 3 ++-
mk/platform/FreeBSD.mk | 3 ++-
mk/platform/GNUkFreeBSD.mk | 3 ++-
mk/platform/Linux.mk | 3 ++-
mk/platform/MirBSD.mk | 3 ++-
mk/platform/NetBSD.mk | 3 ++-
mk/platform/OpenBSD.mk | 3 ++-
9 files changed, 18 insertions(+), 10 deletions(-)
diffs (153 lines):
diff -r 6c2eea797d77 -r fd8b2d38e0fb mk/help/ulimit.help
--- a/mk/help/ulimit.help Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/help/ulimit.help Tue Apr 21 17:01:55 2015 +0000
@@ -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 -r 6c2eea797d77 -r fd8b2d38e0fb mk/pkgformat/pkg/package.mk
--- a/mk/pkgformat/pkg/package.mk Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/pkgformat/pkg/package.mk Tue Apr 21 17:01:55 2015 +0000
@@ -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 @@
${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 -r 6c2eea797d77 -r fd8b2d38e0fb mk/platform/DragonFly.mk
--- a/mk/platform/DragonFly.mk Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/platform/DragonFly.mk Tue Apr 21 17:01:55 2015 +0000
@@ -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 @@
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 -r 6c2eea797d77 -r fd8b2d38e0fb mk/platform/FreeBSD.mk
--- a/mk/platform/FreeBSD.mk Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/platform/FreeBSD.mk Tue Apr 21 17:01:55 2015 +0000
@@ -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 @@
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 -r 6c2eea797d77 -r fd8b2d38e0fb mk/platform/GNUkFreeBSD.mk
--- a/mk/platform/GNUkFreeBSD.mk Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/platform/GNUkFreeBSD.mk Tue Apr 21 17:01:55 2015 +0000
@@ -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 @@
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 -r 6c2eea797d77 -r fd8b2d38e0fb mk/platform/Linux.mk
--- a/mk/platform/Linux.mk Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/platform/Linux.mk Tue Apr 21 17:01:55 2015 +0000
@@ -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 @@
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 -r 6c2eea797d77 -r fd8b2d38e0fb mk/platform/MirBSD.mk
--- a/mk/platform/MirBSD.mk Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/platform/MirBSD.mk Tue Apr 21 17:01:55 2015 +0000
@@ -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 @@
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 -r 6c2eea797d77 -r fd8b2d38e0fb mk/platform/NetBSD.mk
--- a/mk/platform/NetBSD.mk Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/platform/NetBSD.mk Tue Apr 21 17:01:55 2015 +0000
@@ -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 @@
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 -r 6c2eea797d77 -r fd8b2d38e0fb mk/platform/OpenBSD.mk
--- a/mk/platform/OpenBSD.mk Tue Apr 21 16:48:38 2015 +0000
+++ b/mk/platform/OpenBSD.mk Tue Apr 21 17:01:55 2015 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index