NetBSD Problem Report #22215

Received: (qmail 25880 invoked by uid 605); 22 Jul 2003 01:05:15 -0000
Message-Id: <20030722010514.35F975EF6A@sanctum.takilma.net>
Date: Mon, 21 Jul 2003 18:05:14 -0700 (PDT)
From: collver1@comcast.net
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: collver1@comcast.net
To: gnats-bugs@gnats.netbsd.org
Subject: add URL correctness warning to pkgtools/pkglint
X-Send-Pr-Version: 3.95

>Number:         22215
>Category:       pkg
>Synopsis:       add URL correctness warning to pkgtools/pkglint
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 22 01:06:00 +0000 2003
>Closed-Date:    Tue Jul 22 07:13:33 +0000 2003
>Last-Modified:  Thu Jul 24 07:56:00 +0000 2003
>Originator:     
>Release:        NetBSD 1.6.1
>Organization:
>Environment:
System: NetBSD sanctum 1.6.1 NetBSD 1.6.1 (SANCTUM) #3: Wed Apr 30 05:47:06 PDT 2003 root@sanctum:/usr/src/sys/arch/i386/compile/SANCTUM i386
Architecture: i386
Machine: i386
>Description:
	HOMEPAGE URLs without a trailing / are incorrect per threads on
	pkgsrc-wip-discuss.  This patch adds a check for this to pkglint.
>How-To-Repeat:
	http://sourceforge.net/mailarchive/forum.php?thread_id=2802239&forum_id=32226
>Fix:
	http://netbsd.math.orst.edu/pkgsrc/pkglint.diff
>Release-Note:
>Audit-Trail:

From: "Jeremy C. Reed" <reed@reedmedia.net>
To: collver1@comcast.net
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/22215: add URL correctness warning to pkgtools/pkglint
Date: Mon, 21 Jul 2003 18:34:09 -0700 (PDT)

 On Mon, 21 Jul 2003 collver1@comcast.net wrote:

 > 	http://netbsd.math.orst.edu/pkgsrc/pkglint.diff

 if ($i !~ m#^\w+://[^\n]+/$#) {

 An URL does not always have to end with slash. Consider /webpage.html or
 /some-text-file

    Jeremy C. Reed
    http://bsd.reedmedia.net/


From: collver1@comcast.net
To: "Jeremy C. Reed" <reed@reedmedia.net>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/22215: add URL correctness warning to pkgtools/pkglint
Date: Mon, 21 Jul 2003 19:00:50 -0700

 On Mon, Jul 21, 2003 at 06:34:09PM -0700, Jeremy C. Reed wrote:
 > On Mon, 21 Jul 2003 collver1@comcast.net wrote:
 > 
 > > 	http://netbsd.math.orst.edu/pkgsrc/pkglint.diff
 > 
 > if ($i !~ m#^\w+://[^\n]+/$#) {
 > 
 > An URL does not always have to end with slash. Consider /webpage.html or
 > /some-text-file

 How about the following?

 if ($1 !~ m#^\w+://[^\n/]+/#) {

 That ought to catch http://hostname.tld but not
 http://hostname.tld/webpage.html

 Cheers,

 Ben
State-Changed-From-To: open->closed 
State-Changed-By: tron 
State-Changed-When: Tue Jul 22 07:12:07 UTC 2003 
State-Changed-Why:  
Home page URLs without a trailing slash aren't necessarily incorrect e.g. 
"http://do.main/dir/file.html". This change is therefor incorrect and 
should not be applied to "pkglint". 

From: Thomas Klausner <wiz@netbsd.org>
To: collver1@comcast.net
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/22215: add URL correctness warning to pkgtools/pkglint
Date: Tue, 22 Jul 2003 09:17:29 +0200

 On Tue, Jul 22, 2003 at 02:01:02AM -0000, collver1@comcast.net wrote:
 >  How about the following?
 >  
 >  if ($1 !~ m#^\w+://[^\n/]+/#) {
 >  
 >  That ought to catch http://hostname.tld but not
 >  http://hostname.tld/webpage.html

 Could you do a pkglint run on current pkgsrc and test the expression
 that way? ``lintpkgsrc -l'' does the hard part, then grep should
 do the rest :)

 Cheers,
  Thomas

From: collver1@comcast.net
To: Thomas Klausner <wiz@netbsd.org>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/22215: add URL correctness warning to pkgtools/pkglint
Date: Tue, 22 Jul 2003 07:51:34 -0700

 On Tue, Jul 22, 2003 at 09:17:29AM +0200, Thomas Klausner wrote:
 > On Tue, Jul 22, 2003 at 02:01:02AM -0000, collver1@comcast.net wrote:
 > >  How about the following?
 > >  
 > >  if ($1 !~ m#^\w+://[^\n/]+/#) {
 > >  
 > >  That ought to catch http://hostname.tld but not
 > >  http://hostname.tld/webpage.html
 > 
 > Could you do a pkglint run on current pkgsrc and test the expression
 > that way? ``lintpkgsrc -l'' does the hard part, then grep should
 > do the rest :)

 Ok, I just did a pkglint on current pkgsrc, and the expression works.

 The only thing the expression doesn't catch is:

 http://hostname.tld/dirname

 Because it is not possible to tell the difference between that and:

 http://hostname.tld/textfilename

 Cheers,

 Ben

From: Thomas Klausner <wiz@netbsd.org>
To: collver1@comcast.net
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/22215: add URL correctness warning to pkgtools/pkglint
Date: Wed, 23 Jul 2003 15:12:38 +0200

 On Tue, Jul 22, 2003 at 07:51:34AM -0700, collver1@comcast.net wrote:
 > Ok, I just did a pkglint on current pkgsrc, and the expression works.

 Ok, so could you please update the diff you posted?
 I tried to handmodify the patch with the expression you mailed,
 but couldn't even get it working on pkglint itself.

 Thanks,
  Thomas

From: collver1@comcast.net
To: Thomas Klausner <wiz@netbsd.org>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/22215: add URL correctness warning to pkgtools/pkglint
Date: Wed, 23 Jul 2003 06:42:32 -0700

 On Wed, Jul 23, 2003 at 03:12:38PM +0200, Thomas Klausner wrote:
 > On Tue, Jul 22, 2003 at 07:51:34AM -0700, collver1@comcast.net wrote:
 > > Ok, I just did a pkglint on current pkgsrc, and the expression works.
 > 
 > Ok, so could you please update the diff you posted?
 > I tried to handmodify the patch with the expression you mailed,
 > but couldn't even get it working on pkglint itself.

 Ok, sorry for the hassle.

 An updated patch is at:
 http://netbsd.math.orst.edu/pkgsrc/pkglint.pl.diff

 This applies to $NetBSD: pkglint.pl,v 1.89 2003/07/14 15:36:29 martti Exp $

 Cheers,

 Ben

From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/22215 CVS commit: pkgsrc/pkgtools/pkglint
Date: Thu, 24 Jul 2003 07:54:48 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Thu Jul 24 07:54:47 UTC 2003

 Modified Files:
 	pkgsrc/pkgtools/pkglint: Makefile
 	pkgsrc/pkgtools/pkglint/files: pkglint.pl

 Log Message:
 Check if HOMEPAGE URL has a trailing slash if it only consists of a hostname.
 From Ben Collver in PR 22215.
 Bump to 3.57.


 To generate a diff of this commit:
 cvs rdiff -r1.163 -r1.164 pkgsrc/pkgtools/pkglint/Makefile
 cvs rdiff -r1.89 -r1.90 pkgsrc/pkgtools/pkglint/files/pkglint.pl

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: Thomas Klausner <wiz@netbsd.org>
To: collver1@comcast.net
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/22215: add URL correctness warning to pkgtools/pkglint
Date: Thu, 24 Jul 2003 09:54:13 +0200

 On Wed, Jul 23, 2003 at 06:42:32AM -0700, collver1@comcast.net wrote:
 > An updated patch is at:
 > http://netbsd.math.orst.edu/pkgsrc/pkglint.pl.diff

 Thank you, I committed that.
 The PR is already closed, so I'll leave it closed :)
  Thomas
>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.