NetBSD Problem Report #46308

From jschauma@netmeister.org  Sat Apr  7 18:06:26 2012
Return-Path: <jschauma@netmeister.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id C060263B946
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  7 Apr 2012 18:06:26 +0000 (UTC)
Message-Id: <20120407180638.9A061356BBB@panix.netmeister.org>
Date: Sat,  7 Apr 2012 14:06:38 -0400 (EDT)
From: jschauma@netmeister.org
Reply-To: jschauma@netmeister.org
To: gnats-bugs@gnats.NetBSD.org
Subject: pkg_add should not display warnings for known compatible platform mismatches
X-Send-Pr-Version: 3.95

>Number:         46308
>Category:       pkg
>Synopsis:       pkg_add should not display warnings for known compatible platform mismatches
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 07 18:10:01 +0000 2012
>Last-Modified:  Sat Apr 07 22:10:02 +0000 2012
>Originator:     Jan Schaumann
>Release:        NetBSD 5.1.2
>Organization:

>Environment:


NetBSD domU-12-31-39-06-69-29.compute-1.internal 5.1.2 NetBSD 5.1.2 (XEN3PAE_DOMU) #0: Thu Feb  2 17:18:36 UTC 2012  builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-2-RELEASE/i386/201202021012Z-obj/home/builds/ab/netbsd-5-1-2-RELEASE/src/sys/arch/i386/compile/XEN3PAE_DOMU i386

>Description:

pkg_add displays a warning whenever a package is installed for a platform that
does not match the current platform 100%.  Under NetBSD, however, we know that
certain platforms will be compatible.  In particular, any package built under
major version N should work on other hosts running major N, even if the build
and deploy hosts have different minor versions.

Not displaying a warning would be helpful, as we do not want to train our users
to ignore such warnings and only display them when they are actually meaningful.

>How-To-Repeat:

On a 5.1.2 system, run

setenv PKG_PATH ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/5.1/All/
pkg_add apache


pkg_add: Warning: package `apache-2.2.21nb1' was built for a platform:
pkg_add: NetBSD/i386 5.1 (pkg) vs. NetBSD/i386 5.1.2 (this host)
pkg_add: Warning: package `perl-5.14.2nb1' was built for a platform:
pkg_add: NetBSD/i386 5.1 (pkg) vs. NetBSD/i386 5.1.2 (this host)
pkg_add: Warning: package `apr-1.4.5' was built for a platform:
pkg_add: NetBSD/i386 5.1 (pkg) vs. NetBSD/i386 5.1.2 (this host)
pkg_add: Warning: package `apr-util-1.3.12nb1' was built for a platform:
pkg_add: NetBSD/i386 5.1 (pkg) vs. NetBSD/i386 5.1.2 (this host)



>Fix:

Add logic in pkg_install/perform.c:compatible_platform() to check that, if we are
in fact on NetBSD and the major OS versions match, we simply return 1.

>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46308: pkg_add should not display warnings for known
 compatible platform mismatches
Date: Sat, 7 Apr 2012 20:55:00 +0200

 On Sat, Apr 07, 2012 at 06:10:01PM +0000, jschauma@netmeister.org wrote:
 > pkg_add displays a warning whenever a package is installed for a platform that
 > does not match the current platform 100%.  Under NetBSD, however, we know that
 > certain platforms will be compatible.  In particular, any package built under
 > major version N should work on other hosts running major N, even if the build
 > and deploy hosts have different minor versions.

 That's not a correct assumption to make, IMO.

 Joerg

From: Jan Schaumann <jschauma@netmeister.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46308: pkg_add should not display warnings for known
	compatible platform mismatches
Date: Sat, 7 Apr 2012 15:07:18 -0400

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

 Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
 =20
 >  On Sat, Apr 07, 2012 at 06:10:01PM +0000, jschauma@netmeister.org wrote:
 >  > pkg_add displays a warning whenever a package is installed for a platf=
 orm that
 >  > does not match the current platform 100%.  Under NetBSD, however, we k=
 now that
 >  > certain platforms will be compatible.  In particular, any package buil=
 t under
 >  > major version N should work on other hosts running major N, even if th=
 e build
 >  > and deploy hosts have different minor versions.
 > =20
 >  That's not a correct assumption to make, IMO.

 We have incomaptible minor versions?  That seems like a problem to me.

 How about compatibility across tiny versions?

 -Jan

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

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

 iQEVAwUBT4CQZWbOT+lva9PXAQKDAAgAzZWPZe7DB69u73LBKiNnD8Y9z+h5KQWU
 4phPx9IdZugqPbm2OlqXSjzYfV34V2ZGZNOzrvRmXSHOYhvDnhe4ngspcxQ+rKOa
 RWx348Xel8RU11AJAtXy+DGzfhRwhLCrDRo2QXBaNBe3FM1zn0cOIMN/yMgeaCrI
 rruTTgAjXvf5sIcADB1OWH/3HaPloE2GCXus6PaOwMZoxQBM1bcnJ0GEukDXzqzA
 c8Y2UNjXk5Xe0Jf8qoyWV1hTnwk7r7j4klT3hs++BOttT3bBZ8PBg/i8MPTkLZ79
 Qo8U0qCFy96Px2GcBrFrmSFEE2Uu0Eoggm5e3B/KfJFRMJjO5uBo3A==
 =FnMu
 -----END PGP SIGNATURE-----

 --S6vg04ofUPzW4qJg--

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46308: pkg_add should not display warnings for known
 compatible platform mismatches
Date: Sat, 7 Apr 2012 21:21:58 +0200

 On Sat, Apr 07, 2012 at 07:10:06PM +0000, Jan Schaumann wrote:
 > The following reply was made to PR pkg/46308; it has been noted by GNATS.
 > 
 > From: Jan Schaumann <jschauma@netmeister.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/46308: pkg_add should not display warnings for known
 > 	compatible platform mismatches
 > Date: Sat, 7 Apr 2012 15:07:18 -0400
 > 
 >  --S6vg04ofUPzW4qJg
 >  Content-Type: text/plain; charset=us-ascii
 >  Content-Disposition: inline
 >  Content-Transfer-Encoding: quoted-printable
 >  
 >  Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
 >  =20
 >  >  On Sat, Apr 07, 2012 at 06:10:01PM +0000, jschauma@netmeister.org wrote:
 >  >  > pkg_add displays a warning whenever a package is installed for a platf=
 >  orm that
 >  >  > does not match the current platform 100%.  Under NetBSD, however, we k=
 >  now that
 >  >  > certain platforms will be compatible.  In particular, any package buil=
 >  t under
 >  >  > major version N should work on other hosts running major N, even if th=
 >  e build
 >  >  > and deploy hosts have different minor versions.
 >  > =20
 >  >  That's not a correct assumption to make, IMO.
 >  
 >  We have incomaptible minor versions?  That seems like a problem to me.
 >  
 >  How about compatibility across tiny versions?

 Well, 5.1 is the state of the netbsd-5 branch at some point between
 5.0.0 and 5.1.0 release, right? So it might have the new X libraries or
 might not have them. Impossible to tell. x.y.z and x.y.z+1 are most
 likely compatible, not sure if we ever pulled up a binary incompatible
 ABI change. I'd still say it is backwards compatible only, e.g. new
 functions may exist in z+1.

 Joerg

From: Havard Eidnes <he@NetBSD.org>
To: gnats-bugs@NetBSD.org, joerg@britannica.bec.de
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, jschauma@netmeister.org
Subject: Re: pkg/46308: pkg_add should not display warnings for known
 compatible platform mismatches
Date: Sun, 08 Apr 2012 00:06:14 +0200 (CEST)

 >  >  We have incomaptible minor versions?  That seems like a problem t=
 o me.
 >  >
 >  >  How about compatibility across tiny versions?
 >
 >  Well, 5.1 is the state of the netbsd-5 branch at some point between
 >  5.0.0 and 5.1.0 release, right?

 No.  There are no 5.0.0 or 5.1.0 releases.  Instead, we call these
 releases along the netbsd-5 branch 5.0 and 5.1 respectively.  Kernels
 built from the netbsd-5 branch between the releases of 5.0 and 5.1 is
 designated 5.0_STABLE.

 >  So it might have the new X libraries or might not have
 >  them. Impossible to tell. x.y.z and x.y.z+1 are most likely
 >  compatible, not sure if we ever pulled up a binary incompatible ABI
 >  change. I'd still say it is backwards compatible only, e.g. new
 >  functions may exist in z+1.

 I vaguely remember us at one point bumping the major of a library
 between minor releases.  So to use packages built on the older
 version, you'd have to also have the library with the old major
 present, e.g. via a compat package.

 I don't think we've ever made a change which broke backward
 compatibility in any more serious way(?)  At least that's clearly not
 the intent.

 So... Packages built for a lower-numbered release should at least be
 usable on another release of the same major, and possibly also on
 newer major releases.  So ... packages built on 5.0 should be usable
 on both 5.0, 5.1 and 5.1.2 etc., and packages built on 5.0.2 should
 also be usable on both 5.1 and 5.1.2, and chances are very good that
 they'll be usable also on 5.0 as well, since we're only supposed to
 fix serious security-related issues in tiny releases, something 5.0.2
 is an instance of.

 Of course, there will always be a few packages which are so tightly
 coupled to the particular version of the OS it is built for, but those
 are few and far between.

 Regards,

 - H=E5vard

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.