pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/49675: Update sysutils/estd to version -r10
>Number: 49675
>Category: pkg
>Synopsis: Update sysutils/estd to version -r10
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Feb 18 09:15:00 +0000 2015
>Originator: Leonardo Taccari
>Release: NetBSD 7.99.5
>Organization:
Università Politecnica delle Marche
>Environment:
System: NetBSD boh 7.99.5 NetBSD 7.99.5 (GENERIC) #1: Wed Feb 18 02:06:11 CET 2015 leot@boh:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
sysutils/estd in pkgsrc (-r9) is not the latest stable version (-r10).
>How-To-Repeat:
$ cd pkgsrc/sysutils/estd
$ make show-var VARNAME=DISTNAME
>Fix:
Please apply the attached patches.
While here I also investigated the OBOE error spotted by David
Brownlee... In reality it was due a missing comma (yes, that I
have introduced it during the last update; I am completely sorry for
that). As usual a possible commit message is attached.
I will also take care to send this fix upstream.
---------------8<----------------------8<----------------------8<---------------
Update sysutils/estd to -r10.
Changes:
* Fix build on DragonFly due to pidfile changes.
* Add support for TECH_LOONGSON, TECH_ROCKCHIP, and TECH_GENERIC. Taken from
pkgsrc, submitted-by: Leonardo Taccari, original patches by Jared D. McNeill.
---------------8<----------------------8<----------------------8<---------------
---------------8<----------------------8<----------------------8<---------------
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/estd/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile 17 Feb 2015 09:59:30 -0000 1.25
+++ Makefile 18 Feb 2015 09:02:39 -0000
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.25 2015/02/17 09:59:30 abs Exp $
-DISTNAME= estd-r9
-PKGREVISION= 1
-PKGNAME= estd-0.9
+DISTNAME= estd-r10
+PKGNAME= estd-0.10
CATEGORIES= sysutils
MASTER_SITES= http://www.ecademix.com/JohannesHofmann/
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/estd/distinfo,v
retrieving revision 1.18
diff -u -r1.18 distinfo
--- distinfo 17 Feb 2015 09:59:30 -0000 1.18
+++ distinfo 18 Feb 2015 09:02:39 -0000
@@ -1,7 +1,7 @@
$NetBSD: distinfo,v 1.18 2015/02/17 09:59:30 abs Exp $
-SHA1 (estd-r9.tar.gz) = ce5540cc62f5da6f9e29bffccab27c6dd96b4ec2
-RMD160 (estd-r9.tar.gz) = 37ab01c6ad20ad43816305b4b7a0e26ccee89271
-Size (estd-r9.tar.gz) = 8947 bytes
-SHA1 (patch-aa) = b11bdf62b5a1e5d70198f86ad322796ea44c0f10
-SHA1 (patch-ab) = d79f3a48e9b98e1f756602451f82e9cb795f4546
+SHA1 (estd-r10.tar.gz) = dea14ac478aad798c37d555ff7ee0597cc13f786
+RMD160 (estd-r10.tar.gz) = 1e30c05bff5efc77dbfa521ac62e1e4e7d236012
+Size (estd-r10.tar.gz) = 9329 bytes
+SHA1 (patch-aa) = 0d263f929c700bc14f16a968e330b103cdeea07e
+SHA1 (patch-ab) = 1f9d29a5ffb61d6fa1cf5b685d645f81d73f698f
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/estd/patches/patch-aa,v
retrieving revision 1.8
diff -u -r1.8 patch-aa
--- patches/patch-aa 1 Feb 2015 18:59:05 -0000 1.8
+++ patches/patch-aa 18 Feb 2015 09:02:39 -0000
@@ -1,6 +1,9 @@
$NetBSD: patch-aa,v 1.8 2015/02/01 18:59:05 wiz Exp $
---- Makefile.orig 2013-03-24 19:14:06.000000000 +0000
+Use BSD_INSTALL_* instead of directly invoking install(1), add DESTDIR
+support and install all the files in the proper locations.
+
+--- Makefile.orig 2015-02-15 21:12:10.000000000 +0000
+++ Makefile
@@ -19,7 +19,8 @@ estd: estd.c
all: estd
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/estd/patches/patch-ab,v
retrieving revision 1.12
diff -u -r1.12 patch-ab
--- patches/patch-ab 17 Feb 2015 09:59:30 -0000 1.12
+++ patches/patch-ab 18 Feb 2015 09:02:39 -0000
@@ -1,148 +1,42 @@
-$NetBSD: patch-ab,v 1.12 2015/02/17 09:59:30 abs Exp $
+$NetBSD$
-Fix off by one error in use of TECH_MAX against freqlist which would cause a
-null pointer to be passed to sysctl
+Add a missing comma that resulted in a smaller freqctl[] and setctl[] (and so
+with a potential off-by-one error).
+Explicitly use TECH_MAX in sizes of freqlist and related arrays.
-Explicitly use TECH_MAX in sizes of freqlist and related arrays
-
-Add mre frequency mechanisms
-
-Add -G, -L and -R options
-
-Add NetBSD support
-
---- estd.c.orig 2013-03-24 19:14:06.000000000 +0000
+--- estd.c.orig 2015-02-15 21:12:10.000000000 +0000
+++ estd.c
-@@ -56,8 +56,11 @@
- #define TECH_POWERNOW 2
- #define TECH_ACPI 3
- #define TECH_INTREPID 4
--#define TECH_MAX 4
--
-+#define TECH_LOONGSON 5
-+#define TECH_ROCKCHIP 6
-+#define TECH_GENERIC 7
-+#define TECH_MAX 7
-+
- /* this is ugly, but... <shrug> */
- #define MAX_FREQS 32
- #define SYSCTLBUF 255
-@@ -118,29 +121,41 @@ int ndomains;
+@@ -121,7 +121,7 @@ int ndomains;
static const size_t cp_time_max_size = sizeof(cp_time[0]) * MAX_CPUS;
#endif
--static char *techdesc[5] = {"Unknown",
-+static char *techdesc[TECH_MAX + 1] = {
-+ "Unknown",
+-static char *techdesc[8] = {"Unknown",
++static char *techdesc[TECH_MAX + 1] = {"Unknown",
"Enhanced SpeedStep",
"PowerNow",
"ACPI P-States",
-- "Intrepid"
-+ "Intrepid",
-+ "Loongson",
-+ "Rockchip",
-+ "Generic"
+@@ -130,20 +130,20 @@ static char *techdesc[8] = {"Unknown",
+ "Rockchip",
+ "Generic"
};
--static char *freqctl[5] = { "",
-+static char *freqctl[TECH_MAX + 1] = {
-+ "",
+-static char *freqctl[8] = { "",
++static char *freqctl[TECH_MAX + 1] = { "",
"machdep.est.frequency.available",
"machdep.powernow.frequency.available",
"hw.acpi.cpu.px_dom0.available",
- "machdep.intrepid.frequency.available"
-+ "machdep.loongson.frequency.available",
-+ "machdep.cpu.frequency.available",
-+ "machdep.frequency.available"
+- "machdep.intrepid.frequency.available"
++ "machdep.intrepid.frequency.available",
+ "machdep.loongson.frequency.available",
+ "machdep.cpu.frequency.available",
+ "machdep.frequency.available"
};
--static char *setctl[5] = { "",
-+static char *setctl[TECH_MAX + 1] = {
-+ "",
+-static char *setctl[8] = { "",
++static char *setctl[TECH_MAX + 1] = { "",
"machdep.est.frequency.target",
"machdep.powernow.frequency.target",
"hw.acpi.cpu.px_dom0.select",
- "machdep.intrepid.frequency.target"
-+ "machdep.loongson.frequency.target",
-+ "machdep.cpu.frequency.target",
-+ "machdep.frequency.current"
- };
-
- void
- usage()
- {
-- printf("usage: estd [-d] [-o] [-n] [-A] [-C] [-E] [-I] [-P] [-a] [-s] [-b] [-p poll interval in us] [-g grace period] [-l low watermark percentage] [-h high watermark percentage] [-m minimum MHz] [-M maximum MHz]\n");
-+ printf("usage: estd [-d] [-o] [-n] [-A] [-C] [-E] [-I] [-L] [-R] [-P] [-G] [-a] [-s] [-b] [-p poll interval in us] [-g grace period] [-l low watermark percentage] [-h high watermark percentage] [-m minimum MHz] [-M maximum MHz]\n");
- printf(" estd -v\n");
- printf(" estd -f\n");
- exit(1);
-@@ -395,7 +410,7 @@ main(int argc, char *argv[])
- FILE *fexists;
-
- /* get command-line options */
-- while ((ch = getopt(argc, argv, "vfdonACEIPasbp:h:l:g:m:M:")) != -1)
-+ while ((ch = getopt(argc, argv, "vfdonACEGILPasbp:h:l:g:m:M:")) != -1)
- switch (ch) {
- case 'v':
- version();
-@@ -426,12 +441,21 @@ main(int argc, char *argv[])
- case 'E':
- tech = TECH_EST;
- break;
-+ case 'G':
-+ tech = TECH_GENERIC;
-+ break;
- case 'I':
- tech = TECH_INTREPID;
- break;
-+ case 'L':
-+ tech = TECH_LOONGSON;
-+ break;
- case 'P':
- tech = TECH_POWERNOW;
- break;
-+ case 'R':
-+ tech = TECH_ROCKCHIP;
-+ break;
- case 'a':
- strategy = AGGRESSIVE;
- break;
-@@ -466,8 +490,9 @@ main(int argc, char *argv[])
-
- ndomains = 1;
- domain = ecalloc(ndomains, sizeof(struct domain));
--
-- #if defined(__DragonFly__)
-+
-+#if defined(__NetBSD__) || defined(__DragonFly__)
-+# if defined(__DragonFly__)
- if (kinfo_get_cpus(&ncpus)) {
- fprintf(stderr, "estd: Cannot get number of cpus\n");
- exit(1);
-@@ -475,18 +500,25 @@ main(int argc, char *argv[])
- cp_time = ecalloc(ncpus, sizeof(struct kinfo_cputime));
- cp_old = ecalloc(ncpus, sizeof(struct kinfo_cputime));
- cp_time_len = ncpus * sizeof(struct kinfo_cputime);
-+# elif defined(__NetBSD__)
-+ size_t ncpus_len = sizeof(ncpus);
-+ if (sysctlbyname("hw.ncpu", &ncpus, &ncpus_len, NULL, 0) != 0) {
-+ fprintf(stderr, "estd: Cannot get number of cpus\n");
-+ exit(1);
-+ }
-+# endif
- domain[0].ncpus = ncpus;
- domain[0].cpus = ecalloc(ncpus, sizeof(int));
- for (i = 0; i < domain[0].ncpus; i++)
- domain[0].cpus[i] = i;
-- #endif
-+#endif
-
- /* try to guess cpu-scaling technology */
- if (tech == TECH_UNKNOWN) {
-- for (tech = 1; tech <= TECH_MAX; tech++) {
-+ for (tech = 1; tech < TECH_MAX; tech++) {
- if (sysctlbyname(freqctl[tech], &frequencies, &freqsize, NULL, 0) >= 0) break;
- }
-- if (tech > TECH_MAX) {
-+ if (tech >= TECH_MAX) {
- fprintf(stderr, "estd: Cannot guess CPU-scaling technology. (maybe you are missing some kernel-option?)\n");
- exit(1);
- }
+- "machdep.intrepid.frequency.target"
++ "machdep.intrepid.frequency.target",
+ "machdep.loongson.frequency.target",
+ "machdep.cpu.frequency.target",
+ "machdep.frequency.current"
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index