NetBSD Problem Report #8982
Received: (qmail 26368 invoked from network); 11 Dec 1999 22:09:47 -0000
Message-Id: <199912112209.QAA16582@egsner.cirr.com>
Date: Sat, 11 Dec 1999 16:09:45 -0600 (CST)
From: Eric Schnoebelen <eric@cirr.com>
Reply-To: eric@cirr.com
To: gnats-bugs@gnats.netbsd.org
Subject: change in pkg_install breaks third party product packaging
X-Send-Pr-Version: 3.95
>Number: 8982
>Category: pkg
>Synopsis: change in pkg_install breaks third party product packaging
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: hubertf
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Dec 11 14:12:00 +0000 1999
>Closed-Date: Mon Dec 20 03:26:19 +0000 1999
>Last-Modified: Mon Dec 20 03:26:55 +0000 1999
>Originator: Eric Schnoebelen
>Release: 1.3.3
>Organization:
Software2Go, LLC/Central Iowa (Model) Railroad
>Environment:
System: NetBSD egsner 1.3.3 NetBSD 1.3.3 (GENERIC) #0: Fri Dec 11 16:21:49 PST 1998 root@struis:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
The following text was included in the November changes to the
NetBSD Package system announcement on 8 December, 1999:
pkg_install: Add code to include the size of a package into
both the installed version and binary packages. The
size can be queried then via pkg_info -s and -S
option. For this, support for the @src directive was
removed (formerly enabled with the pkg_create -s
switch, but unused in our pkg system). [hubertf
1999-11-29]
As a third party/vendor of software for NetBSD, FreeBSD, and
OpenBSD, we have depended upon the -s switch to allow us to package
software on a system with out the software being installed in its final
resting place (Generally using something like DESTDIR to install NetBSD
into a alternate area for packaging.)
>How-To-Repeat:
Attempt to package using an alternate root.
>Fix:
Chagne the `-s' flag back to source-directory, and use another flag
for SizePkg..
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: hubertf
State-Changed-When: Sat Dec 11 17:52:24 PST 1999
State-Changed-Why:
We can re-invent this with another switch, see other mail.
- Hubert
Responsible-Changed-From-To: pkg-manager->hubertf
Responsible-Changed-By: hubertf
Responsible-Changed-When: Sat Dec 11 17:52:24 PST 1999
Responsible-Changed-Why:
i'll handle this.
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
To: Eric Schnoebelen <eric@cirr.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/8982: change in pkg_install breaks third party product
packaging
Date: Sun, 12 Dec 1999 02:53:54 +0100 (MET)
On Sat, 11 Dec 1999, Eric Schnoebelen wrote:
> >Fix:
> Chagne the `-s' flag back to source-directory, and use another flag
> for SizePkg..
Given that 's' and 'S' need to be both available in pkg_create and
pkg_info, finding something appropriate isn't that easy. Would giving
some other switch (-L for location? Suggestions welcome!) be ok for you?
BTW may I dare to ask for a bit more information on how to reproduce this?
I'm mostly interrested in how you do these 'package up uninstalled(?)'
builds. Also, do you do this in pkgsrc packages, or on some of your own?
If so, which? (asking out of sheer curiosity). Please feel free to answer
the latter paragraph on tech-pkg@netbsd.org, as I think more people would
be interrested in that.
Thanks!
- Hubert
--
NetBSD - Better for your uptime than Viagra
From: eric@cirr.com (Eric Schnoebelen)
To: hubert.feyrer@informatik.fh-regensburg.de
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/8982: change in pkg_install breaks third party product packaging
Date: Sat, 11 Dec 1999 20:25:11 -0600
Hubert Feyrer writes:
- On Sat, 11 Dec 1999, Eric Schnoebelen wrote:
- > >Fix:
- > Chagne the `-s' flag back to source-directory, and use another flag
- > for SizePkg..
-
- Given that 's' and 'S' need to be both available in pkg_create and
- pkg_info, finding something appropriate isn't that easy. Would giving
- some other switch (-L for location? Suggestions welcome!) be ok for you?
Hmm.. Well, the FreeBSD and OpenBSD are still using `-s'
for the source directory.. I'd rather not have to special case
NetBSD in our Imakefiles.. :-/
Convince OpenBSD and FreeBSD to pick up the change, and
I'd be a happy camper.. :-)
- BTW may I dare to ask for a bit more information on how to reproduce this?
Sure, you may.. :-)
- I'm mostly interrested in how you do these 'package up uninstalled(?)'
- builds.
Our (Im|M)akefiles understand DESTDIR, so we build, and
then install into an alternate directory, using something
roughly like:
make install DESTDIR=`pwd`/../install
followed by
make package DESTDIR=`pwd`/../install
where the package target looks like this:
# lifted from our pkg/Imakefile
# <edit/generate the INSTALL, UNINSTALL, README,
# COPYRIGHT, packing list, etc files>
pkg_create -f /tmp/PLIST.devel -c $(TOP)/CURDIR/COMMENT \ @@\
-d $(TOP)/CURDIR/DESCR -v -p $(PROJECTROOT) \ @@\
-i /tmp/INSTALL -k /tmp/INSTALL \ @@\
-s $(DESTDIR)/$(PROJECTROOT) -D /tmp/COPYRIGHT \ @@\
$(PRODUCT)-develop-$$REL-$$OS.tgz ;
- Also, do you do this in pkgsrc packages, or on some of your own?
Our own. We are Software2Go, LLC, and offer Motif 2.1.x for
NetBSD, OpenBSD, FreeBSD, and Linux on SPARC, Alpha and i386 platforms
(with more under consideration.) (for more details on the product, visit
http://www.apps2go.com) Our products are packaged using the native
packaging tools on the BSD's, in the belief that people will be more
comfortable using the OS provided packaging tools instead of anything
would could have rolled on our own.. (of course, on Linux, this was
impossible, as there are at least three common packaging formats!)
- If so, which? (asking out of sheer curiosity). Please feel free to answer
- the latter paragraph on tech-pkg@netbsd.org, as I think more people would
- be interrested in that.
I'm reminded of another annoyance with NetBSD's pkg_create. It
inserts all of the files that are being bundled into the pkg.db
database, even when using an alternate source location. I haven't
previously reported this, as I haven't had the time to track down the
problem in the source, and suggest a fix.
- Thanks!
Thank you! for making NetBSD a wonderful product!
Eric Schnoebelen
hat 1: Software2Go, LLC (eric@apps2go.com)
hat 2: Central Iowa (Model) Railroad (eric@cirr.com)
--
Eric Schnoebelen eric@cirr.com http://www.cirr.com
Yea, though I walk through the valley of the shadow of APL, I shall
fear no evil, for I can string six primitive monadic and dyadic
operators together. -- Steve Higgins
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
To: Eric Schnoebelen <eric@cirr.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/8982: change in pkg_install breaks third party product
packaging
Date: Sun, 12 Dec 1999 04:40:01 +0100 (MET)
On Sat, 11 Dec 1999, Eric Schnoebelen wrote:
> Hmm.. Well, the FreeBSD and OpenBSD are still using `-s'
> for the source directory.. I'd rather not have to special case
> NetBSD in our Imakefiles.. :-/
Well, somewhen one has to drop backward compatibility to get new features.
And I think you're getting this one quite cheap - how about adding
something like this to your (I)Makefile:
#if defined( __NetBSD__)
PKG_SOURCE_SWITCH= -L # or whatever - your choice :)
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
PKG_SOURCE_SWITCH= -s
#endif
and use that then below.
> I'm reminded of another annoyance with NetBSD's pkg_create. It
> inserts all of the files that are being bundled into the pkg.db
> database, even when using an alternate source location. I haven't
> previously reported this, as I haven't had the time to track down the
> problem in the source, and suggest a fix.
~same problem - pkgdb doesn't provide overriding the prefix as it's not
used in pkgsrc.
- Hubert
--
NetBSD - Better for your uptime than Viagra
From: eric@cirr.com (Eric Schnoebelen)
To: hubert.feyrer@informatik.fh-regensburg.de
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/8982: change in pkg_install breaks third party product packaging
Date: Sat, 11 Dec 1999 22:03:43 -0600
Hubert Feyrer writes:
- On Sat, 11 Dec 1999, Eric Schnoebelen wrote:
- > Hmm.. Well, the FreeBSD and OpenBSD are still using `-s'
- > for the source directory.. I'd rather not have to special case
- > NetBSD in our Imakefiles.. :-/
-
- Well, somewhen one has to drop backward compatibility to get new features.
I'm well aware of that!.. (I did OS/Utilities work for
CONVEX Computer for five years in the early 90's.. talk about
getting abused when incompatible changes were introduced! :-0)
- And I think you're getting this one quite cheap - how about adding
- something like this to your (I)Makefile:
-
- #if defined( __NetBSD__)
- PKG_SOURCE_SWITCH= -L # or whatever - your choice :)
- #elif defined(__FreeBSD__) || defined(__OpenBSD__)
- PKG_SOURCE_SWITCH= -s
- #endif
-
- and use that then below.
Which is pretty much what I'll do.
- > I'm reminded of another annoyance with NetBSD's pkg_create. It
- > inserts all of the files that are being bundled into the pkg.db
- > database, even when using an alternate source location. I haven't
- > previously reported this, as I haven't had the time to track down the
- > problem in the source, and suggest a fix.
-
- ~same problem - pkgdb doesn't provide overriding the prefix as it's not
- used in pkgsrc.
As I said, I hadn't reported it as I wasn't able to
offer a fix. As it stands, it's a minor annoyance when doing
test installs on the build machines.. When I get a chance to
track it down, and propose a fix, I certainly will.
In the mean time, I think I need to go review the
tech-pkg archives to see what's happened recently..
Thanks,
Eric
--
Eric Schnoebelen eric@cirr.com http://www.cirr.com
Yea, though I walk through the valley of the shadow of APL, I shall
fear no evil, for I can string six primitive monadic and dyadic
operators together. -- Steve Higgins
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
To: Eric Schnoebelen <eric@cirr.com>
Cc: gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org
Subject: Re: pkg/8982: change in pkg_install breaks third party product
packaging
Date: Sun, 12 Dec 1999 05:14:31 +0100 (MET)
On Sat, 11 Dec 1999, Eric Schnoebelen wrote:
> - #if defined( __NetBSD__)
> - PKG_SOURCE_SWITCH= -L # or whatever - your choice :)
> - #elif defined(__FreeBSD__) || defined(__OpenBSD__)
> - PKG_SOURCE_SWITCH= -s
> - #endif
> -
> - and use that then below.
>
> Which is pretty much what I'll do.
OK, sorry for not offering a better solution here.
Is the pkg_create -L switch ok for you, reintroducing what was
-s before?
Any input on this from the tech-pkg folks? :)
> As I said, I hadn't reported it as I wasn't able to
> offer a fix. As it stands, it's a minor annoyance when doing
> test installs on the build machines.. When I get a chance to
> track it down, and propose a fix, I certainly will.
Shouldn't be too hard to prepend the Src/-L prefix instead of the real
prefix to pkgdb, if available...
- Hubert
--
NetBSD - Better for your uptime than Viagra
From: eric@cirr.com (Eric Schnoebelen)
To: hubert.feyrer@informatik.fh-regensburg.de
Cc: gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org
Subject: Re: pkg/8982: change in pkg_install breaks third party product packaging
Date: Sat, 11 Dec 1999 22:40:50 -0600
Hubert Feyrer writes:
- On Sat, 11 Dec 1999, Eric Schnoebelen wrote:
- > - #if defined( __NetBSD__)
- > - PKG_SOURCE_SWITCH= -L # or whatever - your choice
- :)
- > - #elif defined(__FreeBSD__) || defined(__OpenBSD__)
- > - PKG_SOURCE_SWITCH= -s
- > - #endif
- > -
- > - and use that then below.
- >
- > Which is pretty much what I'll do.
-
- OK, sorry for not offering a better solution here.
- Is the pkg_create -L switch ok for you, reintroducing what was
- -s before?
It'll work. Having the functionality is _extremely_
useful to us..
- Any input on this from the tech-pkg folks? :)
I haven't heard anything.. And I've even subscribed to
the list..
- > As I said, I hadn't reported it as I wasn't able to
- > offer a fix. As it stands, it's a minor annoyance when doing
- > test installs on the build machines.. When I get a chance to
- > track it down, and propose a fix, I certainly will.
-
- Shouldn't be too hard to prepend the Src/-L prefix instead of the real
- prefix to pkgdb, if available...
Actually, I don't think it should get entered into the
pkgdb at all, since it's not being installed on the system, just
packaged. (aka, from a collection of files and directories into
a bundle that can be installed via pkg_add.)
Something for me to look into when I have time.. :-)
Thanks,
Eric
--
Eric Schnoebelen eric@cirr.com http://www.cirr.com
Yea, though I walk through the valley of the shadow of APL, I shall
fear no evil, for I can string six primitive monadic and dyadic
operators together. -- Steve Higgins
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
To: Eric Schnoebelen <eric@cirr.com>
Cc: gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org,
Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>
Subject: Re: pkg/8982: change in pkg_install breaks third party product
packaging
Date: Thu, 16 Dec 1999 04:14:30 +0100 (MET)
Hi Eric!
> Any input on this from the tech-pkg folks? :)
After I had to wade through the overwhelming feedback on this from
tech-pkg, I've put together patches to add the old -s switch back as -L
now. Can you please let me know if they work for you, I can't really test
this.
In any case, let me know so I can commit this and close the PR. Thanks!
- Hubert
Index: create/create.h
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/create/create.h,v
retrieving revision 1.13
diff -u -r1.13 create.h
--- create.h 1999/11/29 19:48:45 1.13
+++ create.h 1999/12/16 03:06:18
@@ -41,6 +41,7 @@
extern char *BuildInfo;
extern char *SizePkg;
extern char *SizeAll;
+extern char *SrcDir;
extern char PlayPen[];
extern size_t PlayPenSize;
extern int Dereference;
Index: create/main.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/create/main.c,v
retrieving revision 1.15
diff -u -r1.15 main.c
--- main.c 1999/11/29 19:48:45 1.15
+++ main.c 1999/12/16 03:06:18
@@ -24,7 +24,7 @@
#include "lib.h"
#include "create.h"
-static char Options[] = "ORhlvFf:p:P:C:c:d:i:k:r:t:X:D:m:s:S:b:B:";
+static char Options[] = "ORhlvFf:p:P:C:c:d:i:k:L:r:t:X:D:m:s:S:b:B:";
char *Prefix = NULL;
char *Comment = NULL;
@@ -42,6 +42,7 @@
char *BuildInfo = NULL;
char *SizePkg = NULL;
char *SizeAll = NULL;
+char *SrcDir = NULL;
char PlayPen[FILENAME_MAX];
size_t PlayPenSize = sizeof(PlayPen);
int Dereference = 0;
@@ -117,6 +118,10 @@
case 'l':
RelativeLinks = 1;
+ break;
+
+ case 'L':
+ SrcDir = optarg;
break;
case 'r':
Index: create/perform.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/create/perform.c,v
retrieving revision 1.21
diff -u -r1.21 perform.c
--- perform.c 1999/11/29 20:09:55 1.21
+++ perform.c 1999/12/16 03:06:19
@@ -263,6 +263,13 @@
printf(".\n");
}
+ /* If a SrcDir override is set, add it now */
+ if (SrcDir) {
+ if (Verbose && !PlistOnly)
+ printf("Using SrcDir value of %s\n", SrcDir);
+ add_plist(&plist, PLIST_SRC, SrcDir);
+ }
+
/* Slurp in the packing list */
read_plist(&plist, pkg_in);
Index: create/pkg_create.1
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/create/pkg_create.1,v
retrieving revision 1.20
diff -u -r1.20 pkg_create.1
--- pkg_create.1 1999/11/29 20:09:55 1.20
+++ pkg_create.1 1999/12/16 03:06:25
@@ -61,6 +61,9 @@
.Op Fl k Ar dscript
.Ek
.Bk -words
+.Op Fl L Ar SrcDir
+.Ek
+.Bk -words
.Op Fl m Ar mtreefile
.Ek
.Bk -words
@@ -119,6 +122,9 @@
and is meant as a convenient shorthand for specifying multiple
.Cm @pkgcfl
directives in the packing list (see PACKING LIST DETAILS section below).
+.It Fl L Ar SrcDir
+This sets the package's @src directive; see below for a description
+of what this does.
.It Fl D Ar displayfile
Display the file after installing the package. Useful for things like
legal notices on almost-free software, etc.
--
NetBSD - Better for your uptime than Viagra
From: eric@cirr.com (Eric Schnoebelen)
To: hubert.feyrer@informatik.fh-regensburg.de
Cc: gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org
Subject: Re: pkg/8982: change in pkg_install breaks third party product packaging
Date: Sat, 18 Dec 1999 11:53:44 -0600
Hubert Feyrer writes:
- > Any input on this from the tech-pkg folks? :)
-
- After I had to wade through the overwhelming feedback on this from
- tech-pkg, I've put together patches to add the old -s switch back as -L
- now. Can you please let me know if they work for you, I can't really test
- this.
It works great! (and in looking at the patches, it did
just as expected! :-)
- In any case, let me know so I can commit this and close the PR. Thanks!
Commit and close!
Thanks,
Eric
--
Eric Schnoebelen eric@cirr.com http://www.cirr.com
"A supercomputer is any computer which turns a CPU bound problem
into an I/O bound problem." -- Unknown
State-Changed-From-To: feedback->closed
State-Changed-By: hubertf
State-Changed-When: Sun Dec 19 19:26:19 PST 1999
State-Changed-Why:
Fix committed (pkg_create -L).
- Hubert
>Unformatted:
(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.