Subject: pkg/10760: pkgsrc infrastructure needs old-installation tests
To: None <gnats-bugs@gnats.netbsd.org>
From: None <wolfgang@wsrcc.com>
List: netbsd-bugs
Date: 08/04/2000 20:42:11
>Number: 10760
>Category: pkg
>Synopsis: pkgsrc infrastructure needs old-installation tests
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 04 20:43:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Rupprecht
>Release: -current, pkgsrc Fri Aug 4 20:31:57 PDT 2000
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Environment:
System: NetBSD pasillo.wsrcc.com 1.5C NetBSD 1.5C (WSRCC) #0: Sun Jul 30 11:47:17 PDT 2000 root@capsicum.wsrcc.com:/v/src/netbsd/NetBSD-current/usr/src/sys/arch/i386/compile/WSRCC i386
>Description:
when a library is built in pkgsrc there is no up-front test to
see if an older version of the include files are present in
/usr/include.
It is only later at "make install" time that the presense of
an older library is tested for. At this point the damage is
already done. The new library would have been compiled
perhaps using the old include files. This is really
diabolical because after the install, all the subsequent code
will be compiled using the correct include files. In effect
only the library will have been mis-compiled.
>How-To-Repeat:
install an old freetype. build the new freetype. Luckily in this
case the compile fails.
Further fun: Su to root and do a "make -k install". The new
/var/db/pkg will contain the *new* data, but the files in
/usr/pkg/include will be the old files. A subsequent pkg_delete
will print out lots of errors and leave the old include files in
/usr/pkg/include due to md5 mismatches.
>Fix:
The pkginstall really needs to have a sanity test where the
md5 is immidiately checked at package install time.
The libraray build process needs to test for and old installation
and request a pkg_delete before the compilation starts.
(Actually this should hold true for any program that installs
a file in /usr/pkg/include)
>Release-Note:
>Audit-Trail:
>Unformatted: