From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 27 11:21:13 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAB6D37B401; Fri, 27 Jun 2003 11:21:13 -0700 (PDT) Received: from InterJet.elischer.org (12-233-125-100.client.attbi.com [12.233.125.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id F404143FE1; Fri, 27 Jun 2003 11:21:12 -0700 (PDT) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA22604; Fri, 27 Jun 2003 11:21:11 -0700 (PDT) Date: Fri, 27 Jun 2003 11:21:09 -0700 (PDT) From: Julian Elischer To: John Baldwin In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org cc: Kris Kennaway Subject: Re: pkg_create broken by design? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2003 18:21:14 -0000 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.