From nobody@FreeBSD.org  Mon May 26 20:57:19 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 1A54FC28
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2014 20:57:19 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 079012AA8
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2014 20:57:19 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QKvIeg029092
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2014 20:57:18 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4QKvICq029090;
	Mon, 26 May 2014 20:57:18 GMT
	(envelope-from nobody)
Message-Id: <201405262057.s4QKvICq029090@cgiserv.freebsd.org>
Date: Mon, 26 May 2014 20:57:18 GMT
From: Jesse <jessefrgsmith@yahoo.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: port update: sysutils/cpulimit
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         190284
>Category:       ports
>Synopsis:       port update: sysutils/cpulimit
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    milki
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 26 21:00:00 UTC 2014
>Closed-Date:    Fri May 30 07:25:47 UTC 2014
>Last-Modified:  Fri May 30 07:30:00 UTC 2014
>Originator:     Jesse
>Release:        FreeBSD-10.0
>Organization:
RM
>Environment:
>Description:
The following patch brings the cpulimit patch up to date with upstream. This includes a number of bug fixes, a more flexible approach to signals and updated documentation.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN /usr/ports/sysutils/cpulimit/Makefile cpulimit/Makefile
--- /usr/ports/sysutils/cpulimit/Makefile	2014-01-22 21:08:56.000000000 -0400
+++ cpulimit/Makefile	2014-05-26 17:37:40.845423090 -0300
@@ -2,7 +2,7 @@
 # $FreeBSD: head/sysutils/cpulimit/Makefile 340722 2014-01-22 17:00:46Z mat $
 
 PORTNAME=	cpulimit
-PORTVERSION=	1.4
+PORTVERSION=	2.2
 CATEGORIES=	sysutils
 MASTER_SITES=	SF/limitcpu/limitcpu/
 
@@ -12,7 +12,7 @@
 LICENSE=	GPLv2
 
 CFLAGS+=	-lkvm -Wall -O2
-MANCOMPRESSED=	yes
+MANCOMPRESSED=	no
 
 PLIST_FILES=	bin/${PORTNAME}
 MAN1=		${PORTNAME}.1
diff -ruN /usr/ports/sysutils/cpulimit/distinfo cpulimit/distinfo
--- /usr/ports/sysutils/cpulimit/distinfo	2014-01-22 21:08:56.000000000 -0400
+++ cpulimit/distinfo	2014-05-26 17:54:12.048412495 -0300
@@ -1,2 +1,2 @@
-SHA256 (cpulimit-1.4.tar.gz) = 48bb37801c83c926bf891ca66927c4c51ed1f2186bb3d61a70b19168d3c576df
-SIZE (cpulimit-1.4.tar.gz) = 15950
+SHA256 (cpulimit-2.2.tar.gz) = 3f64daa5c4ab9245fa6ae5b564a2ffb3ae60677785103a207fd5f9c5c4cc29e4
+SIZE (cpulimit-2.2.tar.gz) = 22224
diff -ruN /usr/ports/sysutils/cpulimit/files/patch-Makefile cpulimit/files/patch-Makefile
--- /usr/ports/sysutils/cpulimit/files/patch-Makefile	1969-12-31 20:00:00.000000000 -0400
+++ cpulimit/files/patch-Makefile	2014-05-26 17:52:30.891485169 -0300
@@ -0,0 +1,15 @@
+--- ./Makefile.orig	2014-05-26 17:50:50.639513964 -0300
++++ ./Makefile	2014-05-26 17:51:17.773388294 -0300
+@@ -11,11 +11,8 @@
+ minix:
+ 	$(CC) -o cpulimit cpulimit.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+ 
+-freebsd:
+-	$(CC) -o cpulimit cpulimit.c -lrt -DFREEBSD $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+-
+ cpulimit: cpulimit.c
+-	$(CC) -o cpulimit cpulimit.c -lrt -DLINUX $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
++	$(CC) -o cpulimit cpulimit.c -lrt -lkvm -DFREEBSD $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+ 
+ tests:
+ 	$(MAKE) -C test
diff -ruN /usr/ports/sysutils/cpulimit/files/patch-cpulimit.c cpulimit/files/patch-cpulimit.c
--- /usr/ports/sysutils/cpulimit/files/patch-cpulimit.c	2014-01-22 21:08:56.000000000 -0400
+++ cpulimit/files/patch-cpulimit.c	1969-12-31 20:00:00.000000000 -0400
@@ -1,59 +0,0 @@
---- ./cpulimit.c.orig	2011-08-12 19:35:36.000000000 -0300
-+++ ./cpulimit.c	2011-08-12 21:31:58.000000000 -0300
-@@ -35,6 +35,15 @@
- #include <limits.h>    // for compatibility
- 
- 
-+#include <limits.h>
-+#include <fcntl.h>
-+#include <kvm.h>
-+#include <paths.h>
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/user.h>
-+
-+
- //kernel time resolution (inverse of one jiffy interval) in Hertz
- //i don't know how to detect it, then define to the default (not very clean!)
- #define HZ 100
-@@ -245,6 +254,31 @@
- }
- 
- //get jiffies count from /proc filesystem
-+int getjiffies(int pid)
-+{
-+   kvm_t *my_kernel = NULL;
-+   struct kinfo_proc *process_data = NULL;
-+   int processes;
-+   int my_jiffies = -1;
-+
-+   my_kernel = kvm_open(0, 0, 0, O_RDONLY, "kvm_open");
-+   if (! my_kernel)
-+   {
-+      printf("Error opening kernel vm. You should be running as root.\n");
-+      return -1;
-+   }
-+
-+   process_data = kvm_getprocs(my_kernel, KERN_PROC_PID, pid, &processes);
-+   if ( (process_data) && (processes >= 1) )
-+       my_jiffies = process_data->ki_runtime;
-+   
-+   kvm_close(my_kernel);
-+   if (my_jiffies >= 0)
-+     my_jiffies /= 1000;
-+   return my_jiffies;
-+}
-+
-+/*
- int getjiffies(int pid) {
- 	static char stat[20];
- 	static char buffer[1024];
-@@ -271,6 +305,8 @@
-         // could not read info
-         return -1;
- }
-+*/
-+
- 
- //process instant photo
- struct process_screenshot {


>Release-Note:
>Audit-Trail:

From: milki <milki@FreeBSD.org>
To: bug-followup@FreeBSD.org, jessefrgsmith@yahoo.ca
Cc: swills@FreeBSD.org, eadler@FreeBSD.org
Subject: Re: ports/190284: port update: sysutils/cpulimit
Date: Tue, 27 May 2014 00:25:58 -0700

 --s2ZSL+KKDSLx8OML
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hi Jesse,
 
 This update seems to be overloaded. 2.2 is now pointing to a new fork of
 the original cpulimit while cpulimit has been relaunched on github.
 
 Would it be more wise to split this port into two with sysutils/limitcpu
 =66rom http://limitcpu.sourceforge.net/ and sysutils/cpulimit from
 https://github.com/opsengine/cpulimit ?
 
 --=20
 milki
 ports committer in training
 
 --s2ZSL+KKDSLx8OML
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQF8BAEBCgBmBQJThD4GXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ3Q0QwMTIyMTg2NjczNDQ5QkJDM0I0NjNB
 MzFENUNBMEY3RTdDMDkyAAoJEKMdXKD358CSmMoIAKLDnG24yaoerxdiORaqNEbu
 DEll6pP79jKIysbwJUlC0aW8Gd/AyOO8Fb/sgM8LD2xfKVYinaJfUO8AWokjE2f7
 HstOLGSdmViQL3xxZtsbytPA8LFDgWMGYqQipW92pBbfK9eZ4tUR4cHLBahG4HGA
 1ot0E8WIvRBsTK+6B3QxVI0c5JFmpfIB8a8+KSBymUKaGQkD6d/irHgGqN7lW8hZ
 5H7l6YSfFcVdUSOPnDcoZ9EOrbIgXl6B5Xa3pp3w3rlKybb1r7ERXf4lJDgIUIom
 1KM3poWxNny6OlCmnQBw8lK+XmY0ECXqy3nfOBfPiHrSvVim/N0cXJcyqwdioII=
 =TvC4
 -----END PGP SIGNATURE-----
 
 --s2ZSL+KKDSLx8OML--

From: Jesse Smith <jessefrgsmith@yahoo.ca>
To: milki <milki@FreeBSD.org>, bug-followup@FreeBSD.org
Cc: swills@FreeBSD.org, eadler@FreeBSD.org
Subject: Re: ports/190284: port update: sysutils/cpulimit
Date: Tue, 27 May 2014 09:34:09 -0300

 On 14-05-27 04:25 AM, milki wrote:
 > Hi Jesse,
 > 
 > This update seems to be overloaded. 2.2 is now pointing to a new fork of
 > the original cpulimit while cpulimit has been relaunched on github.
 > 
 > Would it be more wise to split this port into two with sysutils/limitcpu
 > from http://limitcpu.sourceforge.net/ and sysutils/cpulimit from
 > https://github.com/opsengine/cpulimit ?
 > 
 
 First, I would like to point out that the cpulimit port has been
 pointing to the new location for a few versions now. Anything past 1.1
 would be the new upstream version and the last version of the FreeBSD
 port was 1.4. We have been using the fork for over a year now in Ports.
 
 Second, the github project is a sort of staging area for experimental
 features and does not collaborate with download (Fedora, Debian,
 FreeBSD). The LimitCPU branch is where stable features are implemented
 and where downstream projects can submit patches to fix issues.
 
 Keeping these things in mind, there really is not anything to be gained
 from maintaining two separate ports. Nor, in my opinion, any reason to
 make a port for the github project since it makes no effort to be
 FreeBSD compatible.
 
 Jesse
 
Responsible-Changed-From-To: freebsd-ports-bugs->milki 
Responsible-Changed-By: milki 
Responsible-Changed-When: Tue May 27 15:42:50 UTC 2014 
Responsible-Changed-Why:  
I'll take this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=190284 

From: milki <milki@FreeBSD.org>
To: Jesse Smith <jessefrgsmith@yahoo.ca>
Cc: bug-followup@FreeBSD.org, swills@FreeBSD.org, eadler@FreeBSD.org
Subject: Re: ports/190284: port update: sysutils/cpulimit
Date: Tue, 27 May 2014 08:42:24 -0700

 --kVXhAStRUZ/+rrGn
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On 09:34 Tue 27 May     , Jesse Smith wrote:
 > Keeping these things in mind, there really is not anything to be gained
 > from maintaining two separate ports. Nor, in my opinion, any reason to
 > make a port for the github project since it makes no effort to be
 > FreeBSD compatible.
 
 Ok. That sounds reasonable. Does it make sense to update pkg-descr WWW     =
                                                                            =
                                                                            =
                                               =20
 to point to http://limitcpu.sourceforge.net/ then?
 
 --=20
 milki
 
 --kVXhAStRUZ/+rrGn
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQF8BAEBCgBmBQJThLJgXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ3Q0QwMTIyMTg2NjczNDQ5QkJDM0I0NjNB
 MzFENUNBMEY3RTdDMDkyAAoJEKMdXKD358CSbqUH/3Bf1CT6yOVshA9VazvmTdSJ
 IE5GtRgU+wT6+4TbKXFrfz/mfhKs3MT52cngpWQIiKHuv4cVGFxjUF10GZQLLfOg
 9fiqyUGQu7QTGfTBF1Bb6XCQtXyVYcgqwFx1ra60IR/8Z9PW6+bCgzZ6mCcwkE61
 MARMJie1Yb1gsfjJia25WQHCQ06nWZtKaipA8m4O2tAbC1Gj8jhi3t+ZiiWNrFqg
 3/JUVmYhlX5fFr2r9e2L/WIdG9FtneRzyqNyiMaCs/RgIoIqzNXY6bJfieR6rxS2
 azj8uUgwlz7D1Mz7Vaz40jLlAWWFF/X6XoHI9eK8MWyCywWAvIMJydqYInckdoc=
 =yo5H
 -----END PGP SIGNATURE-----
 
 --kVXhAStRUZ/+rrGn--

From: milki <milki@FreeBSD.org>
To: Jesse Smith <jessefrgsmith@yahoo.ca>
Cc: bug-followup@FreeBSD.org, swills@FreeBSD.org, eadler@FreeBSD.org
Subject: Re: ports/190284: port update: sysutils/cpulimit
Date: Tue, 27 May 2014 08:49:56 -0700

 --EY/WZ/HvNxOox07X
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Also, are you aware of stage directory [0]? This port will need to be
 converted to use staging as well. Let me know off thread if need help
 with that.
 
 
 [0] https://wiki.freebsd.org/ports/StageDir
 
 --=20
 milki
 
 --EY/WZ/HvNxOox07X
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQF8BAEBCgBmBQJThLQkXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ3Q0QwMTIyMTg2NjczNDQ5QkJDM0I0NjNB
 MzFENUNBMEY3RTdDMDkyAAoJEKMdXKD358CSJP8H/iCwe4nWuSsxpBM8XY9A7hR+
 w/XOrwtvo5v/5Iz3Nir9fQblUS7TT2E3XqIA0LqohlBnqoF3mW1SNsbk6FNddVib
 ZN4xSpMrCk3i+2rYjcNYReiGGwdaRnz2pbFHMPbFX5RNdYwz6LueRR1JuQW6DRIh
 IRub27YeJ+fxd0lhnS31BDbvy7AsnlUK4myseVBPZQ/S0qJu6GFmN7abnhQctnZr
 zLk4FYsGWhU58g1BQKEow+X8U5uIDCFb0YzQDguiOrFhyKbBQoQQFcQzU3IJClft
 a1ryNkO1sERwaS2TP+502qtg6Ds50gw8eFtLbekHQLoqJXdDb4Y/DM0XRFGiyWU=
 =65vZ
 -----END PGP SIGNATURE-----
 
 --EY/WZ/HvNxOox07X--

From: Jesse Smith <jessefrgsmith@yahoo.ca>
To: milki <milki@FreeBSD.org>
Cc: bug-followup@FreeBSD.org, swills@FreeBSD.org, eadler@FreeBSD.org
Subject: Re: ports/190284: port update: sysutils/cpulimit
Date: Tue, 27 May 2014 12:49:06 -0300

 On 14-05-27 12:42 PM, milki wrote:
 > On 09:34 Tue 27 May     , Jesse Smith wrote:
 >> Keeping these things in mind, there really is not anything to be gained
 >> from maintaining two separate ports. Nor, in my opinion, any reason to
 >> make a port for the github project since it makes no effort to be
 >> FreeBSD compatible.
 > 
 > Ok. That sounds reasonable. Does it make sense to update pkg-descr WWW                                                                                                                                                                                                          
 > to point to http://limitcpu.sourceforge.net/ then?
 > 
 
 Yes, I think it does make sense to update the WWW path to point to the
 new upstream.
 
 Jesse
 
 
State-Changed-From-To: open->closed 
State-Changed-By: milki 
State-Changed-When: Fri May 30 07:25:24 UTC 2014 
State-Changed-Why:  
Thanks! Committed with minor changes. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=190284 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/190284: commit references a PR
Date: Fri, 30 May 2014 07:24:57 +0000 (UTC)

 Author: milki
 Date: Fri May 30 07:24:52 2014
 New Revision: 355795
 URL: http://svnweb.freebsd.org/changeset/ports/355795
 QAT: https://qat.redports.org/buildarchive/r355795/
 
 Log:
   Update sysutils/cpulimit to 2.2
   
   - Update for stagedir
   - Update WWW
   
   PR:		ports/190284
   Submitted by:	jesse (maintainer)
   Reviewed by:	bapt
   Approved by:	swills (mentor), eadler (mentor)
 
 Added:
   head/sysutils/cpulimit/files/patch-Makefile   (contents, props changed)
 Deleted:
   head/sysutils/cpulimit/files/patch-cpulimit.c
 Modified:
   head/sysutils/cpulimit/Makefile
   head/sysutils/cpulimit/distinfo
   head/sysutils/cpulimit/pkg-descr
 
 Modified: head/sysutils/cpulimit/Makefile
 ==============================================================================
 --- head/sysutils/cpulimit/Makefile	Fri May 30 07:14:28 2014	(r355794)
 +++ head/sysutils/cpulimit/Makefile	Fri May 30 07:24:52 2014	(r355795)
 @@ -2,24 +2,26 @@
  # $FreeBSD$
  
  PORTNAME=	cpulimit
 -PORTVERSION=	1.4
 +PORTVERSION=	2.2
  CATEGORIES=	sysutils
  MASTER_SITES=	SF/limitcpu/limitcpu/
  
  MAINTAINER=	jessefrgsmith@yahoo.ca
 -COMMENT=	A program to limit the CPU usage of a process
 +COMMENT=	Limit the CPU usage of a process
  
  LICENSE=	GPLv2
  
  CFLAGS+=	-lkvm -Wall -O2
 -MANCOMPRESSED=	yes
  
 -PLIST_FILES=	bin/${PORTNAME}
 -MAN1=		${PORTNAME}.1
 +PLIST_FILES=	bin/cpulimit \
 +				man/man1/cpulimit.1.gz
  
 -NO_STAGE=	yes
  post-patch:
  	@${REINPLACE_CMD} -e 's|share/||g' ${WRKSRC}/Makefile
  	@${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/Makefile
  
 +do-install:
 +	${INSTALL_PROGRAM} ${WRKSRC}/cpulimit ${STAGEDIR}${PREFIX}/bin/cpulimit
 +	${INSTALL_MAN} ${WRKSRC}/cpulimit.1 ${STAGEDIR}${MANPREFIX}/man/man1/cpulimit.1
 +
  .include <bsd.port.mk>
 
 Modified: head/sysutils/cpulimit/distinfo
 ==============================================================================
 --- head/sysutils/cpulimit/distinfo	Fri May 30 07:14:28 2014	(r355794)
 +++ head/sysutils/cpulimit/distinfo	Fri May 30 07:24:52 2014	(r355795)
 @@ -1,2 +1,2 @@
 -SHA256 (cpulimit-1.4.tar.gz) = 48bb37801c83c926bf891ca66927c4c51ed1f2186bb3d61a70b19168d3c576df
 -SIZE (cpulimit-1.4.tar.gz) = 15950
 +SHA256 (cpulimit-2.2.tar.gz) = 3f64daa5c4ab9245fa6ae5b564a2ffb3ae60677785103a207fd5f9c5c4cc29e4
 +SIZE (cpulimit-2.2.tar.gz) = 22224
 
 Added: head/sysutils/cpulimit/files/patch-Makefile
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/sysutils/cpulimit/files/patch-Makefile	Fri May 30 07:24:52 2014	(r355795)
 @@ -0,0 +1,15 @@
 +--- ./Makefile.orig	2014-05-26 17:50:50.639513964 -0300
 ++++ ./Makefile	2014-05-26 17:51:17.773388294 -0300
 +@@ -11,11 +11,8 @@
 + minix:
 + 	$(CC) -o cpulimit cpulimit.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
 + 
 +-freebsd:
 +-	$(CC) -o cpulimit cpulimit.c -lrt -DFREEBSD $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
 +-
 + cpulimit: cpulimit.c
 +-	$(CC) -o cpulimit cpulimit.c -lrt -DLINUX $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
 ++	$(CC) -o cpulimit cpulimit.c -lrt -lkvm -DFREEBSD $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
 + 
 + tests:
 + 	$(MAKE) -C test
 
 Modified: head/sysutils/cpulimit/pkg-descr
 ==============================================================================
 --- head/sysutils/cpulimit/pkg-descr	Fri May 30 07:14:28 2014	(r355794)
 +++ head/sysutils/cpulimit/pkg-descr	Fri May 30 07:24:52 2014	(r355795)
 @@ -2,4 +2,4 @@ The cpulimit program throttles back a pr
  user to slow down jobs that would otherwise choke the processor. It is also
  helpful on laptops where we want to avoid generating a lot of heat.
  
 -WWW:	http://cpulimit.sourceforge.net/
 +WWW: http://limitcpu.sourceforge.net/
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
