From nobody@FreeBSD.org  Wed Sep 25 12:25:42 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5791437B401
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Sep 2002 12:25:42 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 15F0D43E42
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Sep 2002 12:25:42 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g8PJPf7R089692
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Sep 2002 12:25:41 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.6/8.12.6/Submit) id g8PJPfFw089691;
	Wed, 25 Sep 2002 12:25:41 -0700 (PDT)
Message-Id: <200209251925.g8PJPfFw089691@www.freebsd.org>
Date: Wed, 25 Sep 2002 12:25:41 -0700 (PDT)
From: Tony Bridges <tbridges@sandvine.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_create fails if target directory does not exist
X-Send-Pr-Version: www-1.0

>Number:         43368
>Category:       bin
>Synopsis:       pkg_create(1) fails if target directory does not exist
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 25 12:30:02 PDT 2002
>Closed-Date:    Wed May 28 14:57:06 UTC 2014
>Last-Modified:  Wed May 28 14:57:06 UTC 2014
>Originator:     Tony Bridges
>Release:        4.6
>Organization:
Sandvine Inc.
>Environment:
FreeBSD bsd-make.sandvine.com 4.6-STABLE FreeBSD 4.6-STABLE #37: Mon Sep 16 10:05:56 EDT 2002     root@TPC-E1-29:/usr/obj/usr/src/sys/TPC  i386
>Description:
When creating a package, pkg_create tries to cwd to the destination directory.  If that directory does not exist (which
can occur when the @cwd source is overridden with @srcdir immediately after the @cwd), the pkg_create fails.  
>How-To-Repeat:
Create a package of the following form:
pkg-plist :
   @name test
   @pkgdep unixODBC-2.2.0
   @pkgdep postgresql-unixodbc-7.2.1_1
   @owner sv
   @group sv
   @cwd /usr/local/vendor/test
   @srcdir /home/user/source/test
   @mode u=x,go=
   test
   @mode u=r,go=
   test.ini
   @cwd /usr/local/etc/rc.d
   @srcdir /home/user/source/test
   test.sh

will fail when /usr/local/vendor/test does not exist on the source machine.  The validity of the @cwd is checked immedia
tely, without regard for the fact that it is overridden with @srcdir before it is used.

>Fix:
create dummy directories on the machine before running pkg_create.
>Release-Note:
>Audit-Trail:

From: Tim Kientzle <kientzle@freebsd.org>
To: freebsd-gnats-submit@freebsd.org, tbridges@sandvine.com
Cc:  
Subject: Re: bin/43368: pkg_create fails if target directory does not exist
Date: Sun, 25 Jul 2004 10:38:14 -0700

 This is a couple of years old now, but I'm trying to at
 least look at all of the tar-related PRs.
 
 a) Is this still broken?
 b) Is it still broken if you have bsdtar installed
     as the default system tar?
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/43368
 
 Tim Kientzle
 
Responsible-Changed-From-To: freebsd-bugs->krion 
Responsible-Changed-By: flz 
Responsible-Changed-When: Fri Aug 19 12:32:54 GMT 2005 
Responsible-Changed-Why:  
Bug krion with pkg_install PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43368 
Responsible-Changed-From-To: krion->portmgr 
Responsible-Changed-By: flz 
Responsible-Changed-When: Fri Jul 17 13:42:26 UTC 2009 
Responsible-Changed-Why:  
pkg_install is maintained by portmgr. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43368 
State-Changed-From-To: open->closed 
State-Changed-By: bapt 
State-Changed-When: Wed May 28 14:57:06 UTC 2014 
State-Changed-Why:  
pkg_install is not being worked on anymore 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43368 
>Unformatted:
