Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2003 11:21:09 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: pkg_create broken by design?
Message-ID:  <Pine.BSF.4.21.0306271101500.22281-100000@InterJet.elischer.org>
In-Reply-To: <XFMail.20030627133704.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Fri, 27 Jun 2003, John Baldwin wrote:

> 
> On 25-Jun-2003 Kris Kennaway wrote:
> > On Tue, Jun 24, 2003 at 05:21:14PM -0700, Julian Elischer wrote:
> >> 
> >> I'm trying to make a package..
> >> according to the man page for pkg_create:
> > 
> > Look into the ports collections for thousands of examples of how to
> > create packages.
> 
> Umm, some of us have to create packages w/o using ports, like for
> in house software.  I have also run into this bug and it is quite
> annoying.

Yes we have inhouse packages to do things like:

* install a special version of apache
* upgrade an 4.x system to 4.8 (including XF86 4.3 and autoamtically
  upgrade the config files needed.
* Take a nameserver and change it to be running in a sandbox
* install local tools
* install an inhouse 'fsck'
* install special printing stuff.
* hacked versions of tar and other tools.
* Add all current security updates to a 4.4 system (6 packages)

etc.

Sometimes it's a pain to have to install the package before one can
build it..

The trouble is that both the @srcdir and the @cwd produce 
'-C [dir]' 
to be added to the 'tar' command list

I see several possible fixes..

1/ add code so that when there is a '@srcdir' operator,
  the next '@cwd' does not add a '-C dir'.
2/ add code so that after a '@srcdir' or '-s' is seen '@cwd' no longer
  EVER adds a -C
3/ add code so that the 
  '-C [dir]' from a '@cwd' is only added if the next operation is NOT a 
  '@srcdir'
4/ add code so that @cwd doesn't produce a 
  -C [dir] 
  if the immediatly previous commad was a '@srcdir'


In addition, the man page says:
     -s srcdir
             srcdir will override the value of @cwd during package 
             creation.

This doesn't happen either..
However it suggests that -s should over-ride *ALL* '@cwd' operations.

Does that mean that a @srcdir should override ALL following @cwd
operators for package build? (option 2) or just the next one? (option 4)

it is also unsure how -s and -p are supposed to interract.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0306271101500.22281-100000>