NetBSD Problem Report #43622

From www@NetBSD.org  Thu Jul 15 12:19:09 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 5AEEB63BAE7
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 15 Jul 2010 12:19:09 +0000 (UTC)
Message-Id: <20100715121908.DEDC263BADF@www.NetBSD.org>
Date: Thu, 15 Jul 2010 12:19:08 +0000 (UTC)
From: aniou@smutek.pl
Reply-To: aniou@smutek.pl
To: gnats-bugs@NetBSD.org
Subject: behaviour of pkg_add should be consistent with build system
X-Send-Pr-Version: www-1.0

>Number:         43622
>Category:       pkg
>Synopsis:       behaviour of pkg_add should be consistent with build system
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    morr
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 15 12:20:00 +0000 2010
>Closed-Date:    Sun May 22 16:57:25 +0000 2011
>Last-Modified:  Sun May 22 16:57:25 +0000 2011
>Originator:     Piotr Meyer
>Release:        Linux
>Organization:
>Environment:
Linux buildhost.domain.pl 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

>Description:
Package built under Linux has OS_VERSION stripped at first '-': for example OS_VERSION '2.6.18-194.8.1.el5' is shortened to '2.6.18'. pkg_add has function for this (normalise_platform() in pkg_install/files/add/perform.c) but at this moment function is used only for DragonFly and FreeBSD, so pkg_add produces annoying comments, for example:

pkg_add: Warning: package `p5-HTML-Parser-3.65' was built for a platform:
pkg_add: Linux/x86_64 2.6.18 (pkg) vs. Linux/x86_64 2.6.18-194.8.1.el5 (this host)

To rid this we need only one, small change in configure.ac, see below.

Sample outputs from uname -r from various distros:

Ubuntu 10.04: 2.6.32-22-server
Fedora 13     2.6.33.5-124.fc13.i686.PAE
RHEL   5.3    2.6.18-194.8.1.el5
Denian 4.x    2.6.18-6-686
Debian 5.x    2.6.26-2-686

>How-To-Repeat:
Build and install any package under Linux.
>Fix:
Change, in pkg_install/files/configure.ac

from:

case $host in
*-*-dragonfly* |*-*-freebsd*)
        AC_DEFINE([NUMERIC_VERSION_ONLY], [1], [Defined when to retain only the numeric OS version])
        ;;
esac

to:

case $host in
*-*-dragonfly* |*-*-freebsd*|*-*-linux*)
        AC_DEFINE([NUMERIC_VERSION_ONLY], [1], [Defined when to retain only the numeric OS version])
        ;;
esac

and re-build 'configure'.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Thu, 15 Jul 2010 12:30:58 +0000
Responsible-Changed-Why:
Over to maintainer.


From: "Daniel Horecki" <morr@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43622 CVS commit: pkgsrc/pkgtools/pkg_install/files
Date: Wed, 20 Apr 2011 09:57:25 +0000

 Module Name:	pkgsrc
 Committed By:	morr
 Date:		Wed Apr 20 09:57:25 UTC 2011

 Modified Files:
 	pkgsrc/pkgtools/pkg_install/files: configure configure.ac

 Log Message:
 Add linux to list for retaining the numeric OS version.
 Fixes PR pkg/43622.


 To generate a diff of this commit:
 cvs rdiff -u -r1.36 -r1.37 pkgsrc/pkgtools/pkg_install/files/configure
 cvs rdiff -u -r1.35 -r1.36 pkgsrc/pkgtools/pkg_install/files/configure.ac

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

Responsible-Changed-From-To: joerg->morr
Responsible-Changed-By: morr@NetBSD.org
Responsible-Changed-When: Wed, 20 Apr 2011 10:10:25 +0000
Responsible-Changed-Why:
Commit was made, awaits for feedback.


State-Changed-From-To: open->feedback
State-Changed-By: morr@NetBSD.org
State-Changed-When: Wed, 20 Apr 2011 10:10:25 +0000
State-Changed-Why:
Waiting for feedback


From: Piotr Meyer <aniou@smutek.pl>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43622 (behaviour of pkg_add should be consistent with
 build system)
Date: Fri, 20 May 2011 15:37:21 +0200

 On Wed, Apr 20, 2011 at 10:10:26AM +0000, morr@NetBSD.org wrote:
 [...]

 > State-Changed-Why:
 > Waiting for feedback

 I tested it under RHEL5, x86_64. Works fine.

 -- 
 Piotr 'aniou' Meyer

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 22 May 2011 16:57:25 +0000
State-Changed-Why:
Confirmed fixed, thanks.


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