NetBSD Problem Report #29152

From pancake@phreaker.net  Sat Jan 29 16:40:42 2005
Return-Path: <pancake@phreaker.net>
Received: from boun01.in.mad.eresmas.com (boun01.eresmas.com [62.81.235.116])
	by narn.netbsd.org (Postfix) with ESMTP id EBCE363B400
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Jan 2005 16:40:41 +0000 (UTC)
Message-Id: <20050129164041.EBCE363B400@narn.netbsd.org>
Date: Sat, 29 Jan 2005 16:40:41 +0000 (UTC)
From: pancake@phreaker.net
Reply-To: pancake@phreaker.net
To: gnats-bugs@netbsd.org
Subject: pkgfind patch for linux and openbsd
X-Send-Pr-Version: 3.95

>Number:         29152
>Category:       pkg
>Synopsis:       pkgfind doesn't builds on OpenBSD/Linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    peter
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 29 16:41:00 +0000 2005
>Closed-Date:    Mon Jan 31 18:48:18 +0000 2005
>Last-Modified:  Mon Jan 31 18:48:18 +0000 2005
>Originator:     pancake@phreaker.net
>Release:        Linux 2.6.8.1
>Organization:

>Environment:


System: Linux bare 2.6.8.1 #10 Sat Jan 29 14:32:28 VET 2005 i686 GNU/Linux
Architecture: i686
Machine: i686
>Description:
openbsd and linux doesn'ti mplement getprogname and setprogname.


>How-To-Repeat:

>Fix:
Index: files/pkgfind.c
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/pkgtools/pkgfind/files/pkgfind.c,v
retrieving revision 1.5
diff -u -r1.5 pkgfind.c
--- files/pkgfind.c     27 Jan 2005 20:42:23 -0000      1.5
+++ files/pkgfind.c     29 Jan 2005 16:37:47 -0000
@@ -70,6 +70,18 @@

 static int             Cflag, cflag, qflag;

+#if __linux__ || __OpenBSD__
+char *name=NULL;
+char *getprogname()
+{
+       return name;
+}
+void setprogname(char *progname)
+{
+       name=progname;
+}
+#endif
+
 int
 main(int argc, char *argv[])
 {



>Release-Note:

>Audit-Trail:
From: "Julio M. Merino Vidal" <jmmv84@gmail.com>
To: gnats-bugs@netbsd.org, peter@pointless.nl
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sat, 29 Jan 2005 22:09:50 +0100

 On Sat, 2005-01-29 at 16:41 +0000, pancake@phreaker.net wrote:
 >  
 > +#if __linux__ || __OpenBSD__
 > +char *name=NULL;
 > +char *getprogname()
 > +{
 > +       return name;
 > +}
 > +void setprogname(char *progname)
 > +{
 > +       name=progname;
 > +}
 > +#endif
 > +
 >  int
 >  main(int argc, char *argv[])
 >  {

 [I'm mailing the software author directly too]

 This is wrong, because many other systems will still fail.  You'd have
 to add a configure script, which I think is not worth the effort.

 The program should simply be changed to not use getprogname nor
 setprogname at all.  This is _trivial_ to do (simply removing the
 last getprogname() call), and I don't know why the original code uses
 them (because it's hardcoding the program name anyway) -- well, being
 NetBSD friendly was probably the reason ;)

 (Besides, your patch does not respect the current style in the code.)

 -- 
 Julio M. Merino Vidal <jmmv84@gmail.com>
 http://www.livejournal.com/users/jmmv/
 The NetBSD Project - http://www.NetBSD.org/

From: Peter Postma <peter@pointless.nl>
To: "Julio M. Merino Vidal" <jmmv84@gmail.com>
Cc: gnats-bugs@netbsd.org, pkgsrc-bugs@netbsd.org,
	jschauma@netbsd.org
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sun, 30 Jan 2005 13:07:57 +0100

 On Sat, Jan 29, 2005 at 10:09:50PM +0100, Julio M. Merino Vidal wrote:
 > On Sat, 2005-01-29 at 16:41 +0000, pancake@phreaker.net wrote:
 > >  
 > > +#if __linux__ || __OpenBSD__
 > > +char *name=NULL;
 > > +char *getprogname()
 > > +{
 > > +       return name;
 > > +}
 > > +void setprogname(char *progname)
 > > +{
 > > +       name=progname;
 > > +}
 > > +#endif
 > > +
 > >  int
 > >  main(int argc, char *argv[])
 > >  {
 > 
 > [I'm mailing the software author directly too]
 > 
 > This is wrong, because many other systems will still fail.  You'd have
 > to add a configure script, which I think is not worth the effort.
 > 
 > The program should simply be changed to not use getprogname nor
 > setprogname at all.  This is _trivial_ to do (simply removing the
 > last getprogname() call), and I don't know why the original code uses
 > them (because it's hardcoding the program name anyway) -- well, being
 > NetBSD friendly was probably the reason ;)
 > 
 > (Besides, your patch does not respect the current style in the code.)
 > 

 [Added jschauma to cc]

 jschauma@ recently added set/getprogname() to make it more portable.
 But if these functions aren't available outside NetBSD then I don't see
 how it would be more portable.

 I see a few ways of fixing this:
 1) get rid of set/getprogname and hardcode it in the usage, as jmmv suggested.
 2) revert the set/getprogname changes and use extern char *__progname again.
    (but will this work everywhere? e.g. IRIX?)
 3) add libnbcompat to systems that don't have set/getprogname.

 Personally, I would prefer 2) and then 1).

 And also, if libnbcompat is only needed for err(1) and warn(1), maybe we
 would be better off by fixing this in the code (by using fprintf/exit combo)
 and then get rid of libnbcompat.

 I've attached a diff that attempts to make it more portable, I would
 appreciate if you could test it on a non-NetBSD system.

 -- 
 Peter Postma

From: Peter Postma <peter@pointless.nl>
To: "Julio M. Merino Vidal" <jmmv84@gmail.com>
Cc: gnats-bugs@netbsd.org, jschauma@netbsd.org
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sun, 30 Jan 2005 14:21:12 +0100

 --Q68bSM7Ycu6FN28Q
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 On Sun, Jan 30, 2005 at 01:07:57PM +0100, Peter Postma wrote:
 > 
 > I've attached a diff that attempts to make it more portable, I would
 > appreciate if you could test it on a non-NetBSD system.
 > 

 emh, now with attachment.

 -- 
 Peter Postma

 --Q68bSM7Ycu6FN28Q
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="pkgfind.diff"

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/pkgfind/Makefile,v
 retrieving revision 1.8
 diff -u -r1.8 Makefile
 --- Makefile	27 Jan 2005 20:42:23 -0000	1.8
 +++ Makefile	30 Jan 2005 12:04:19 -0000
 @@ -1,6 +1,6 @@
  # $NetBSD: Makefile,v 1.8 2005/01/27 20:42:23 jschauma Exp $

 -DISTNAME=	pkgfind-20050127
 +DISTNAME=	pkgfind-20050130
  CATEGORIES=	pkgtools
  MASTER_SITES=	# empty
  DISTFILES=	# empty
 @@ -32,12 +32,4 @@
  SUBST_SED.path=		-e "s,/usr/pkgsrc,${PKGSRCDIR},g"
  SUBST_MESSAGE.path=	"Adjusting pkgsrc directory."

 -.include "../../mk/bsd.prefs.mk"
 -
 -.if ${OPSYS} == "IRIX"
 -CFLAGS+=	-DNEED_LIBNBCOMPAT
 -LDFLAGS+=	-lnbcompat
 -.  include "../../pkgtools/libnbcompat/buildlink3.mk" # need err(1), warn(1)
 -.endif
 -
  .include "../../mk/bsd.pkg.mk"
 Index: files/pkgfind.c
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/pkgfind/files/pkgfind.c,v
 retrieving revision 1.5
 diff -u -r1.5 pkgfind.c
 --- files/pkgfind.c	27 Jan 2005 20:42:23 -0000	1.5
 +++ files/pkgfind.c	30 Jan 2005 12:04:19 -0000
 @@ -38,14 +38,9 @@
  #include <sys/param.h>
  #include <sys/stat.h>

 -#ifdef NEED_LIBNBCOMPAT
 -#include <nbcompat.h>
 -#else
 -#include <err.h>
 -#endif
 -
  #include <ctype.h>
  #include <dirent.h>
 +#include <errno.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
 @@ -76,8 +71,6 @@
  	const char *path;
  	int ch;

 -	setprogname("pkgfind");
 -
  	/* default searches have partial matches */
  	search = partialmatch;

 @@ -126,25 +119,27 @@
  	char *text, *comment = NULL;
  	struct stat sb;

 -	if ((ncat = scandir(path, &cat, checkskip, alphasort)) < 0)
 -		err(EXIT_FAILURE, "%s", path);
 +	if ((ncat = scandir(path, &cat, checkskip, alphasort)) < 0) {
 +		fprintf(stderr, "%s: %s", path, strerror(errno));
 +		exit(EXIT_FAILURE);
 +	}

  	for (i = 0; i < ncat; i++) {
  		if (snprintf(tmp, sizeof(tmp), "%s/%s", path, cat[i]->d_name)
  		    >= sizeof(tmp)) {
 -			warnx("filename too long");
 +			fprintf(stderr, "filename too long");
  			continue;
  		}
  		if (stat(tmp, &sb) < 0 || !S_ISDIR(sb.st_mode))
  			continue;
  		if ((nlist = scandir(tmp, &list, checkskip, alphasort)) < 0) {
 -			warn("%s", tmp);
 +			fprintf(stderr, "%s: %s", tmp, strerror(errno));
  			continue;
  		}
  		for (j = 0; j < nlist; j++) {
  			if (snprintf(tmp, sizeof(tmp), "%s/%s/%s", path,
  			    cat[i]->d_name, list[j]->d_name) >= sizeof(tmp)) {
 -				warnx("filename too long");
 +				fprintf(stderr, "filename too long");
  				continue;
  			}
  			if (stat(tmp, &sb) < 0 || !S_ISDIR(sb.st_mode))
 @@ -177,13 +172,17 @@
  	len = strlen(path) + strlen(cat) + strlen(pkg) + strlen("Makefile") + 3 + 1;

  	if (!qflag) {
 -		if ((mk = malloc(len)) == NULL)
 -			err(EXIT_FAILURE, "malloc");
 +		if ((mk = malloc(len)) == NULL) {
 +			fprintf(stderr, "malloc: %s", strerror(errno));
 +			exit(EXIT_FAILURE);
 +		}
  		(void)snprintf(mk, len, "%s/%s/%s/Makefile", path, cat, pkg);

  		if (getcomment(mk, &comment) == 0) {
 -			if ((mk = realloc(mk, len + 7)) == NULL)
 -				err(EXIT_FAILURE, "malloc");
 +			if ((mk = realloc(mk, len + 7)) == NULL) {
 +				fprintf(stderr, "malloc: %s", strerror(errno));
 +				exit(EXIT_FAILURE);
 +			}
  			(void)snprintf(mk, len+7, "%s/%s/%s/Makefile.common",
  			    path, cat, pkg);
  			(void)getcomment(mk, &comment);
 @@ -268,6 +267,8 @@
  static void
  usage(void)
  {
 -	(void)fprintf(stderr, "Usage: %s [-Ccqx] keyword [...]\n", getprogname());
 +	extern char *__progname;
 +
 +	(void)fprintf(stderr, "Usage: %s [-Ccqx] keyword [...]\n", __progname);
  	exit(EXIT_FAILURE);
  }

 --Q68bSM7Ycu6FN28Q--

From: Jan Schaumann <jschauma@netmeister.org>
To: Peter Postma <peter@pointless.nl>
Cc: "Julio M. Merino Vidal" <jmmv84@gmail.com>,
	gnats-bugs@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sun, 30 Jan 2005 11:48:56 -0500

 --wRtZRu2mMGBZ6YQ7
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable

 Peter Postma <peter@pointless.nl> wrote:
 =20
 > [Added jschauma to cc]
 >=20
 > jschauma@ recently added set/getprogname() to make it more portable.
 > But if these functions aren't available outside NetBSD then I don't see
 > how it would be more portable.

 Through use of libnbcompat, which we provide for all supported OS.

 >=20
 > I see a few ways of fixing this:
 > 1) get rid of set/getprogname and hardcode it in the usage, as jmmv sugge=
 sted.
 > 2) revert the set/getprogname changes and use extern char *__progname aga=
 in.
 >    (but will this work everywhere? e.g. IRIX?)
 > 3) add libnbcompat to systems that don't have set/getprogname.
 >=20
 > Personally, I would prefer 2) and then 1).

 I don't see a problem with (3):  the systems that need it, would likely
 have libnbcompat installed anyway.

 However, the program is small enough so that eliminating the need of
 these might be more practical.  Plus, it's your program, so it's your
 call. :-)

 > I've attached a diff that attempts to make it more portable, I would
 > appreciate if you could test it on a non-NetBSD system.

 IRIX needs limits.h for PATH_MAX, and it doesn't seem to know
 __progname.

 -Jan

 --=20
 Life," said Marvin, "don't talk to me about life."

 --wRtZRu2mMGBZ6YQ7
 Content-Type: application/pgp-signature
 Content-Disposition: inline

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.3 (NetBSD)

 iD8DBQFB/Q/4fFtkr68iakwRAlCRAJ4n03b/gMcvWjFtJYXLorsAcPW0mACcDrk0
 pGqL2hsVT9O1XXkwIzbD/Ug=
 =XRHy
 -----END PGP SIGNATURE-----

 --wRtZRu2mMGBZ6YQ7--

From: Peter Postma <peter@pointless.nl>
To: Jan Schaumann <jschauma@netmeister.org>
Cc: "Julio M. Merino Vidal" <jmmv84@gmail.com>, gnats-bugs@netbsd.org
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sun, 30 Jan 2005 18:53:08 +0100

 --OgqxwSJOaUobr8KG
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 On Sun, Jan 30, 2005 at 11:48:56AM -0500, Jan Schaumann wrote:
 > Peter Postma <peter@pointless.nl> wrote:
 >  
 > > [Added jschauma to cc]
 > > 
 > > jschauma@ recently added set/getprogname() to make it more portable.
 > > But if these functions aren't available outside NetBSD then I don't see
 > > how it would be more portable.
 > 
 > Through use of libnbcompat, which we provide for all supported OS.
 > 
 > > 
 > > I see a few ways of fixing this:
 > > 1) get rid of set/getprogname and hardcode it in the usage, as jmmv suggested.
 > > 2) revert the set/getprogname changes and use extern char *__progname again.
 > >    (but will this work everywhere? e.g. IRIX?)
 > > 3) add libnbcompat to systems that don't have set/getprogname.
 > > 
 > > Personally, I would prefer 2) and then 1).
 > 
 > I don't see a problem with (3):  the systems that need it, would likely
 > have libnbcompat installed anyway.
 > 
 > However, the program is small enough so that eliminating the need of
 > these might be more practical.  Plus, it's your program, so it's your
 > call. :-)
 > 

 Yes, it's so small that I'd rather fix problem functions then adding
 a dependency... Not that I dislike libnbcompat, but it just too easy
 to fix the need for it.

 > > I've attached a diff that attempts to make it more portable, I would
 > > appreciate if you could test it on a non-NetBSD system.
 > 
 > IRIX needs limits.h for PATH_MAX, and it doesn't seem to know
 > __progname.
 > 

 Ok, the attached diff should be ok now I think.
 Could you please check it one more time before I commit it?

 Thanks,
 -- 
 Peter Postma

 --OgqxwSJOaUobr8KG
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=diff

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/pkgfind/Makefile,v
 retrieving revision 1.8
 diff -u -r1.8 Makefile
 --- Makefile	27 Jan 2005 20:42:23 -0000	1.8
 +++ Makefile	30 Jan 2005 17:50:08 -0000
 @@ -1,6 +1,6 @@
  # $NetBSD: Makefile,v 1.8 2005/01/27 20:42:23 jschauma Exp $

 -DISTNAME=	pkgfind-20050127
 +DISTNAME=	pkgfind-20050130
  CATEGORIES=	pkgtools
  MASTER_SITES=	# empty
  DISTFILES=	# empty
 @@ -32,12 +32,4 @@
  SUBST_SED.path=		-e "s,/usr/pkgsrc,${PKGSRCDIR},g"
  SUBST_MESSAGE.path=	"Adjusting pkgsrc directory."

 -.include "../../mk/bsd.prefs.mk"
 -
 -.if ${OPSYS} == "IRIX"
 -CFLAGS+=	-DNEED_LIBNBCOMPAT
 -LDFLAGS+=	-lnbcompat
 -.  include "../../pkgtools/libnbcompat/buildlink3.mk" # need err(1), warn(1)
 -.endif
 -
  .include "../../mk/bsd.pkg.mk"
 Index: files/pkgfind.c
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/pkgfind/files/pkgfind.c,v
 retrieving revision 1.5
 diff -u -r1.5 pkgfind.c
 --- files/pkgfind.c	27 Jan 2005 20:42:23 -0000	1.5
 +++ files/pkgfind.c	30 Jan 2005 17:50:08 -0000
 @@ -38,14 +38,9 @@
  #include <sys/param.h>
  #include <sys/stat.h>

 -#ifdef NEED_LIBNBCOMPAT
 -#include <nbcompat.h>
 -#else
 -#include <err.h>
 -#endif
 -
  #include <ctype.h>
  #include <dirent.h>
 +#include <errno.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
 @@ -64,7 +59,7 @@
  static int		checkskip(const struct dirent *);
  static int		partialmatch(const char *, const char *);
  static int		exactmatch(const char *, const char *);
 -static void		usage(void);
 +static void		usage(const char *);

  static int		(*search)(const char *, const char *);

 @@ -73,11 +68,10 @@
  int
  main(int argc, char *argv[])
  {
 +	const char *progname = argv[0];
  	const char *path;
  	int ch;

 -	setprogname("pkgfind");
 -
  	/* default searches have partial matches */
  	search = partialmatch;

 @@ -98,7 +92,7 @@
  			search = exactmatch;
  			break;
  		default:
 -			usage();
 +			usage(progname);
  			/* NOTREACHED */
  		}
  	}
 @@ -106,7 +100,7 @@
  	argv += optind;

  	if (argc < 1)
 -		usage();
 +		usage(progname);

  	if ((path = getenv("PKGSRCDIR")) == NULL)
  		path = PKGSRCDIR;
 @@ -126,25 +120,27 @@
  	char *text, *comment = NULL;
  	struct stat sb;

 -	if ((ncat = scandir(path, &cat, checkskip, alphasort)) < 0)
 -		err(EXIT_FAILURE, "%s", path);
 +	if ((ncat = scandir(path, &cat, checkskip, alphasort)) < 0) {
 +		fprintf(stderr, "%s: %s\n", path, strerror(errno));
 +		exit(EXIT_FAILURE);
 +	}

  	for (i = 0; i < ncat; i++) {
  		if (snprintf(tmp, sizeof(tmp), "%s/%s", path, cat[i]->d_name)
  		    >= sizeof(tmp)) {
 -			warnx("filename too long");
 +			fprintf(stderr, "filename too long\n");
  			continue;
  		}
  		if (stat(tmp, &sb) < 0 || !S_ISDIR(sb.st_mode))
  			continue;
  		if ((nlist = scandir(tmp, &list, checkskip, alphasort)) < 0) {
 -			warn("%s", tmp);
 +			fprintf(stderr, "%s: %s\n", tmp, strerror(errno));
  			continue;
  		}
  		for (j = 0; j < nlist; j++) {
  			if (snprintf(tmp, sizeof(tmp), "%s/%s/%s", path,
  			    cat[i]->d_name, list[j]->d_name) >= sizeof(tmp)) {
 -				warnx("filename too long");
 +				fprintf(stderr, "filename too long\n");
  				continue;
  			}
  			if (stat(tmp, &sb) < 0 || !S_ISDIR(sb.st_mode))
 @@ -177,13 +173,17 @@
  	len = strlen(path) + strlen(cat) + strlen(pkg) + strlen("Makefile") + 3 + 1;

  	if (!qflag) {
 -		if ((mk = malloc(len)) == NULL)
 -			err(EXIT_FAILURE, "malloc");
 +		if ((mk = malloc(len)) == NULL) {
 +			fprintf(stderr, "malloc: %s\n", strerror(errno));
 +			exit(EXIT_FAILURE);
 +		}
  		(void)snprintf(mk, len, "%s/%s/%s/Makefile", path, cat, pkg);

  		if (getcomment(mk, &comment) == 0) {
 -			if ((mk = realloc(mk, len + 7)) == NULL)
 -				err(EXIT_FAILURE, "malloc");
 +			if ((mk = realloc(mk, len + 7)) == NULL) {
 +				fprintf(stderr, "malloc: %s\n", strerror(errno));
 +				exit(EXIT_FAILURE);
 +			}
  			(void)snprintf(mk, len+7, "%s/%s/%s/Makefile.common",
  			    path, cat, pkg);
  			(void)getcomment(mk, &comment);
 @@ -266,8 +266,8 @@
  }

  static void
 -usage(void)
 +usage(const char *progname)
  {
 -	(void)fprintf(stderr, "Usage: %s [-Ccqx] keyword [...]\n", getprogname());
 +	(void)fprintf(stderr, "Usage: %s [-Ccqx] keyword [...]\n", progname);
  	exit(EXIT_FAILURE);
  }

 --OgqxwSJOaUobr8KG--

From: "Julio M. Merino Vidal" <jmmv84@gmail.com>
To: Peter Postma <peter@pointless.nl>
Cc: Jan Schaumann <jschauma@netmeister.org>, gnats-bugs@netbsd.org
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sun, 30 Jan 2005 20:37:44 +0100

 On Sun, 2005-01-30 at 18:53 +0100, Peter Postma wrote:

 > Ok, the attached diff should be ok now I think.
 > Could you please check it one more time before I commit it?

 @@ -73,11 +68,10 @@
  int
  main(int argc, char *argv[])
  {
 +       const char *progname = argv[0];
         const char *path;
         int ch;

 -       setprogname("pkgfind");
 -
         /* default searches have partial matches */
         search = partialmatch;

 I think you could instead do:

     if ((progname = strrchr(argv[0], '/')) != NULL)
         progname++;
     else
         progname = argv[0];

 to remove any possible directory name from argv[0].

 Cheers,

 -- 
 Julio M. Merino Vidal <jmmv84@gmail.com>
 http://www.livejournal.com/users/jmmv/
 The NetBSD Project - http://www.NetBSD.org/

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@netbsd.org, pkg-manager@netbsd.org,
	gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Cc: 
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sun, 30 Jan 2005 17:00:45 -0500

 On Jan 30,  1:22pm, peter@pointless.nl (Peter Postma) wrote:
 -- Subject: Re: pkg/29152: pkgfind patch for linux and openbsd

 | The following reply was made to PR pkg/29152; it has been noted by GNATS.
 | 
 | From: Peter Postma <peter@pointless.nl>
 | To: "Julio M. Merino Vidal" <jmmv84@gmail.com>
 | Cc: gnats-bugs@netbsd.org, jschauma@netbsd.org
 | Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
 | Date: Sun, 30 Jan 2005 14:21:12 +0100
 | 
 |  --Q68bSM7Ycu6FN28Q
 |  Content-Type: text/plain; charset=us-ascii
 |  Content-Disposition: inline
 |  
 |  On Sun, Jan 30, 2005 at 01:07:57PM +0100, Peter Postma wrote:
 |  > 
 |  > I've attached a diff that attempts to make it more portable, I would
 |  > appreciate if you could test it on a non-NetBSD system.
 |  > 
 |  
 |  emh, now with attachment.

 I'd rather leave this alone. What if people start porting to even dumber
 OS's? This is what libnbcompat is for.

 christos

Responsible-Changed-From-To: pkg-manager->peter
Responsible-Changed-By: peter@netbsd.org
Responsible-Changed-When: Mon, 31 Jan 2005 15:01:34 +0000
Responsible-Changed-Why:
Mine.


State-Changed-From-To: open->feedback
State-Changed-By: peter@netbsd.org
State-Changed-When: Mon, 31 Jan 2005 15:01:34 +0000
State-Changed-Why:
I've added libnbcompat dependency to all OS's that don't have set/getprogname.
Please let me know if this fixes the problem for you.


State-Changed-From-To: feedback->closed
State-Changed-By: peter@netbsd.org
State-Changed-When: Mon, 31 Jan 2005 18:48:18 +0000
State-Changed-Why:
Fix confirmed by submitter in private mail.
Thanks for the PR!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.