NetBSD Problem Report #36788
From yx@solo.x.ua Wed Aug 15 11:07:07 2007
Return-Path: <yx@solo.x.ua>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 188BA63B8EA
for <gnats-bugs@gnats.NetBSD.org>; Wed, 15 Aug 2007 11:07:07 +0000 (UTC)
Message-Id: <200708151106.l7FB6urM039232@solo.x.ua>
Date: Wed, 15 Aug 2007 14:06:56 +0300 (EEST)
From: Yakovetsky Vladimir <yx@x.ua>
Reply-To: yx@x.ua
To: gnats-bugs@NetBSD.org
Cc:
Subject: sysutils/skill: please update to 4.1.4, plus build on freebsd/linux
X-Send-Pr-Version: 3.113.1
X-GNATS-Notify:
>Number: 36788
>Category: pkg
>Synopsis: sysutils/skill: update to 4.1.4, and make this build on linux and freebsd too
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: obache
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Aug 15 11:10:00 +0000 2007
>Closed-Date: Sat Oct 27 02:54:45 +0000 2007
>Last-Modified: Sun Oct 28 14:25:00 +0000 2007
>Originator: Yakovetsky Vladimir
>Release:
>Organization:
>Environment:
System: FreeBSD solo.x.ua 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #0: Sun Aug 12 18:14:48 EEST 2007 yx@solo.x.ua:/usr/obj/usr/src/sys/solo i386
>Description:
sysutils/skill:
update to 4.1.4, and make this build on linux and freebsd too
(it is checked on freebsd-6.2 and linux-2.6.21)
>How-To-Repeat:
>Fix:
- update Makefile to 4.1.4
- regenerate previous patches (-aa, -ab)
- add FreeBSD/nbsd-44 and Linux/linux-1 lines in Makefile
- suppress annoying warnings (patch-ac)
--- sysutils/skill/Makefile.~1~
+++ sysutils/skill/Makefile
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.22 2007/01/07 09:14:13 rillig Exp $
#
-DISTNAME= skill-4.1.1
+DISTNAME= skill-4.1.4
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.flux.utah.edu/pub/skill/
EXTRACT_SUFX= .tgz
@@ -24,6 +24,11 @@
.elif ${OPSYS} == "SunOS"
BINMODE= 02555
MAKE_ENV+= OSTYPE=sys-5r4 BINGRP=sys CPPFLAGS=
+.elif ${OPSYS} == "FreeBSD"
+MAKE_ENV+= OSTYPE=nbsd-44
+.elif ${OPSYS} == "Linux"
+MAKE_ENV+= OSTYPE=linux-1
+CPPFLAGS+= -DHAS_STRERROR=1
.endif
pre-install:
:r /usr/pkgsrc/sysutils/skill/patches/patch-aa
--- Makefile.orig
+++ Makefile
@@ -62,15 +62,15 @@
# CONFIGURE: Set location of executable, it's group and mode.
BINDIR= ${PREFIX}/bin
-BINGRP= wheel
-BINMOD= 555
+#BINGRP= wheel
+#BINMOD= 555
# CONFIGURE: Set location of man directory and man page suffix.
MANDIR= ${PREFIX}/man/man1
MANSFX= 1
# CONFIGURE(Config): Select an OSTYPE for your machine from the list above.
-OSTYPE= nbsd-44
+#OSTYPE= nbsd-44
# CONFIGURE(Config): Add any OS-specific options here.
COPTS=
@@ -82,7 +82,7 @@
OBJS= main.o argparse.o getproc.o
HDRS= conf.h
-CFLAGS= -O ${COPTS}
+CFLAGS+=${COPTS}
all: skill
@@ -96,23 +96,23 @@
${OBJS}: ${HDRS}
install: skill
- -test -d ${DESTDIR}/${BINDIR} || mkdir -p -m 755 ${DESTDIR}/${BINDIR}
- -test -d ${DESTDIR}/${MANDIR} || mkdir -p -m 755 ${DESTDIR}/${MANDIR}
+# -test -d ${DESTDIR}/${BINDIR} || mkdir -p -m 755 ${DESTDIR}/${BINDIR}
+# -test -d ${DESTDIR}/${MANDIR} || mkdir -p -m 755 ${DESTDIR}/${MANDIR}
#(SysV) filepriv -d ${DESTDIR}/${BINDIR}/skill
- rm -f ${DESTDIR}/${BINDIR}/skill ${DESTDIR}/${MANDIR}/skill.${MANSFX}
- rm -f ${DESTDIR}/${BINDIR}/snice ${DESTDIR}/${MANDIR}/snice.${MANSFX}
+# rm -f ${DESTDIR}/${BINDIR}/skill ${DESTDIR}/${MANDIR}/skill.${MANSFX}
+# rm -f ${DESTDIR}/${BINDIR}/snice ${DESTDIR}/${MANDIR}/snice.${MANSFX}
# install -c -g ${BINGRP} -m ${BINMOD} -s skill ${DESTDIR}/${BINDIR}
- cp skill ${DESTDIR}/${BINDIR}/skill
- strip ${DESTDIR}/${BINDIR}/skill
- chgrp ${BINGRP} ${DESTDIR}/${BINDIR}/skill
- chmod ${BINMOD} ${DESTDIR}/${BINDIR}/skill
- ln ${DESTDIR}/${BINDIR}/skill ${DESTDIR}/${BINDIR}/snice
+# cp skill ${DESTDIR}/${BINDIR}/skill
+# strip ${DESTDIR}/${BINDIR}/skill
+# chgrp ${BINGRP} ${DESTDIR}/${BINDIR}/skill
+# chmod ${BINMOD} ${DESTDIR}/${BINDIR}/skill
+# ln ${DESTDIR}/${BINDIR}/skill ${DESTDIR}/${BINDIR}/snice
#(SysV) filepriv -f dacread ${DESTDIR}/${BINDIR}/skill
# install -c -m 644 skill.1 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
- cp skill.1 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
- chmod 644 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
- ln ${DESTDIR}/${MANDIR}/skill.${MANSFX}\
- ${DESTDIR}/${MANDIR}/snice.${MANSFX}
+# cp skill.1 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
+# chmod 644 ${DESTDIR}/${MANDIR}/skill.${MANSFX}
+# ln ${DESTDIR}/${MANDIR}/skill.${MANSFX}\
+# ${DESTDIR}/${MANDIR}/snice.${MANSFX}
config Config: FRC
./Config
:r /usr/pkgsrc/sysutils/skill/patches/patch-ab
--- main.c.orig
+++ main.c
@@ -46,7 +46,14 @@
#include <stdio.h>
#include <errno.h>
#include <pwd.h>
+#ifdef __NetBSD__
+#include <sys/sysctl.h>
+#endif
+#ifndef KI_MAXCOMLEN /* Pre NetBSD/1.5. Missing on !NetBSD */
+#define KI_MAXCOMLEN 24
+#endif
+
/*
* Processes which could not be checked -- usually due to permission
* problems (SunOS 4.1, SysVR4) -- are tallied in "MissedProcCnt".
@@ -137,7 +144,7 @@
for (i = 0; i < CmdIndx; i++) {
cmdp = (CmdList + i);
if ((cmdp->flags & CMD_FLAG_EXACT) != 0 &&
- STREQU(CMD, cmdp->cmd.cmdstr))
+ STRNEQU(CMD, cmdp->cmd.cmdstr, KI_MAXCOMLEN-8))
break;
else if ((cmdp->flags & CMD_FLAG_REGEX) != 0 &&
RegexMatch(CMD, cmdp) != 0)
:r /usr/pkgsrc/sysutils/skill/patches/patch-ac
--- argparse.c.~1~
+++ argparse.c
@@ -29,6 +29,9 @@
#undef NO_AEXTERN
#include <stdio.h>
+#ifdef __STDC__
+#include <stdlib.h>
+#endif
#include <ctype.h>
#include <pwd.h>
--- main.c.~1~
+++ main.c
@@ -44,6 +44,9 @@
#include "conf.h"
#include <stdio.h>
+#ifdef __STDC__
+#include <stdlib.h>
+#endif
#include <errno.h>
#include <pwd.h>
#ifdef __NetBSD__
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->obache
Responsible-Changed-By: obache@netbsd.org
Responsible-Changed-When: Sat, 27 Oct 2007 02:54:45 +0000
Responsible-Changed-Why:
I commited it.
State-Changed-From-To: open->closed
State-Changed-By: obache@netbsd.org
State-Changed-When: Sat, 27 Oct 2007 02:54:45 +0000
State-Changed-Why:
Updated. Thanks for the PR!
From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/36788 CVS commit: pkgsrc/sysutils/skill
Date: Sat, 27 Oct 2007 02:52:24 +0000 (UTC)
Module Name: pkgsrc
Committed By: obache
Date: Sat Oct 27 02:52:23 UTC 2007
Modified Files:
pkgsrc/sysutils/skill: Makefile distinfo
pkgsrc/sysutils/skill/patches: patch-aa patch-ab
Added Files:
pkgsrc/sysutils/skill/patches: patch-ac
Log Message:
Update skill to 4.1.4.
Based on patch provided by Yakovetsky Vladimir in PR 36788.
Add target for FreeBSD and Linux (and IRIX/OSF/AIX/HUPX, not tested).
XXX: Should use distribution's Config script instead?
4.1.2: Minor feature enhancements
This release features support for Cygwin. It validates on Solaris 5.9-10, HP-UX
11.23, and FreeBSD 5.3. There is an HP-UX 64-bit fix. The FreeBSD 5.x special
proc handling was improved, and there were some minor cleanups.
4.1.3: Minor feature enhancements
This release adds support for AIX v5. It has a work-around for a Solaris issue
where the process open() call would hang.
4.1.4: Minor bugfixes
skill and snice now act on each process only once (for systems like BSD that
return the same Process ID multiple times, once for each instantiated thread).
Support has also been added for FreeBSD 6.2 and HP-UX 11.31.
To generate a diff of this commit:
cvs rdiff -r1.22 -r1.23 pkgsrc/sysutils/skill/Makefile
cvs rdiff -r1.9 -r1.10 pkgsrc/sysutils/skill/distinfo
cvs rdiff -r1.11 -r1.12 pkgsrc/sysutils/skill/patches/patch-aa
cvs rdiff -r1.12 -r1.13 pkgsrc/sysutils/skill/patches/patch-ab
cvs rdiff -r0 -r1.1 pkgsrc/sysutils/skill/patches/patch-ac
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Yakovetsky Vladimir <yx@x.ua>
To: obache@NetBSD.org
Cc: gnats-bugs@NetBSD.org, pkg-manager@NetBSD.org,
pkgsrc-bugs@NetBSD.org, gnats-admin@NetBSD.org
Subject: Re: pkg/36788 (sysutils/skill: update to 4.1.4, and make this build on linux and freebsd too)
Date: Sat, 27 Oct 2007 20:34:52 +0300
On Sat, Oct 27, 2007 at 02:54:46AM +0000, obache@NetBSD.org wrote:
> Synopsis: sysutils/skill: update to 4.1.4, and make this build on linux and freebsd too
>
> Responsible-Changed-From-To: pkg-manager->obache
> Responsible-Changed-By: obache@netbsd.org
> Responsible-Changed-When: Sat, 27 Oct 2007 02:54:45 +0000
> Responsible-Changed-Why:
> I commited it.
>
Sorry, but please correct again (look in the original patches).
1) typo in sysutils/skill/Makefile - s/OPSYS=/OSTYPE=/
i.e.
--- sysutils/skill/Makefile.orig
+++ sysutils/skill/Makefile
@@ -25,18 +25,18 @@
BINMODE= 02555
MAKE_ENV+= OSTYPE=sys-5r4 BINGRP=sys CPPFLAGS=
.elif ${OPSYS} == "FreeBSD"
-MAKE_ENV+= OPSYS=nbsd-44
+MAKE_ENV+= OSTYPE=nbsd-44
.elif ${OPSYS} == "Linux"
-MAKE_ENV+= OPSYS=linux-1
+MAKE_ENV+= OSTYPE=linux-1
CPPFLAGS+= -DHAS_STRERROR=1
.elif ${OPSYS} == "IRIX"
-MAKE_ENV+= OPSYS=irix5
+MAKE_ENV+= OSTYPE=irix5
.elif ${OPSYS} == "OSF"
-MAKE_ENV+= OPSYS=mach-3
+MAKE_ENV+= OSTYPE=mach-3
.elif ${OPSYS} == "AIX"
-MAKE_ENV+= OPSYS=aix-3
+MAKE_ENV+= OSTYPE=aix-3
.elif ${OPSYS} == "HPUX"
-MAKE_ENV+= OPSYS=hpux-10
+MAKE_ENV+= OSTYPE=hpux-10
.endif
pre-install:
2) incorrect patch-ac for linux `patch' tool:
% uname -sr
Linux 2.6.21.5
% patch -v | head -1
patch 2.5.9
% cd /usr/pkgsrc/sysutils/skill && bmake
...
=> Applying pkgsrc patches for skill-4.1.4
1 out of 1 hunk FAILED -- saving rejects to file argparse.c.rej
Patch /usr/pkgsrc/sysutils/skill/patches/patch-ac failed
ERROR: Patching failed due to modified or broken patch file(s):
ERROR: /usr/pkgsrc/sysutils/skill/patches/patch-ac
*** Error code 1
fix: use original patch-ac
--- argparse.c.orig
+++ argparse.c
@@ -29,6 +29,9 @@
#undef NO_AEXTERN
#include <stdio.h>
+#ifdef __STDC__
+#include <stdlib.h>
+#endif
#include <ctype.h>
#include <pwd.h>
i.e.
-@@ -30,5 +30,8 @@ #undef NO_AEXTERN
+@@ -29,6 +29,9 @@
Thanks in advance,
--
Yakovetsky Vladimir
From: OBATA Akio <obache@NetBSD.org>
To: yx@x.ua
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/36788 (sysutils/skill: update to 4.1.4, and make this build
on linux and freebsd too)
Date: Sun, 28 Oct 2007 13:37:15 +0900
--On 2007/10/27 20:34 +0300 Yakovetsky Vladimir <yx@x.ua> wrote:
> 1) typo in sysutils/skill/Makefile - s/OPSYS=/OSTYPE=/
Fixed. Thanks!
> 2) incorrect patch-ac for linux `patch' tool:
> fix: use original patch-ac
It is necessary to use the patch made with 'mkpatches' tools
in pkgtools/pkgdiff to facilitate maintaining.
But unnecessary $Id$ is included in the patch, and it is not good to manage
with CVS in the place where you patched.
I ajusted patch to not contains $Id$ by hand, but it seems
gnu patch is not like it.
So I moved patch location below and regen patch-ac.
Now it should maitain easy and works with gnu patch.
--
"Of course I love NetBSD":-)
OBATA Akio / obache@NetBSD.org
From: Bernd Ernesti <veego@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/36788 (sysutils/skill: update to 4.1.4, and make this build on linux and freebsd too)
Date: Sun, 28 Oct 2007 08:10:20 +0100
On Sun, Oct 28, 2007 at 04:40:05AM +0000, OBATA Akio wrote:
> --On 2007/10/27 20:34 +0300 Yakovetsky Vladimir <yx@x.ua> wrote:
>
> > 1) typo in sysutils/skill/Makefile - s/OPSYS=/OSTYPE=/
>
> Fixed. Thanks!
>
> > 2) incorrect patch-ac for linux `patch' tool:
>
> > fix: use original patch-ac
>
> It is necessary to use the patch made with 'mkpatches' tools
> in pkgtools/pkgdiff to facilitate maintaining.
IMHO mkpatches is broken, because the functions names in the line
numbers cause problems with some patch programs. I think it was MacOS
where it breaks.
Bernd
From: OBATA Akio <obache@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/36788 (sysutils/skill: update to 4.1.4, and make this build
on linux and freebsd too)
Date: Sun, 28 Oct 2007 21:20:55 +0900
--On 2007/10/28 7:15 +0000 Bernd Ernesti <veego@NetBSD.org> wrote:
> IMHO mkpatches is broken, because the functions names in the line
> numbers cause problems with some patch programs. I think it was MacOS
> where it breaks.
I have not seen such an error with my MacOS box up to now...
If there is a platform with patch that causes such an error,
we should change the specification of mkpatches or change in
such a platform to use patch with another interchangeability.
--
"Of course I love NetBSD":-)
OBATA Akio / obache@NetBSD.org
From: Yakovetsky Vladimir <yx@x.ua>
To: obache@NetBSD.org
Cc: gnats-bugs@NetBSD.org, gnats-admin@NetBSD.org,
pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/36788 (sysutils/skill: update to 4.1.4, and make this build on linux and freebsd too)
Date: Sun, 28 Oct 2007 15:57:40 +0200
>> 2) incorrect patch-ac for linux `patch' tool:
> So I moved patch location below and regen patch-ac.
> Now it should maitain easy and works with gnu patch.
>
Thanks.
p.s. please regen distinfo too.
--
Yakovetsky Vladimir
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/36788 (sysutils/skill: update to 4.1.4, and make this build on linux and freebsd too)
Date: Sun, 28 Oct 2007 23:23:43 +0900
On Sun, 28 Oct 2007 23:00:13 +0900, Yakovetsky Vladimir <yx@x.ua> wrote:
> p.s. please regen distinfo too.
I forgot to commit it accidently... should fixed this time....
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.