NetBSD Problem Report #18912

Received: (qmail 20174 invoked by uid 605); 4 Nov 2002 04:55:34 -0000
Message-Id: <200211040556.gA45uX002986@mofo.grunta.com>
Date: Mon, 4 Nov 2002 16:56:34 +1100 (EST)
From: grant@netbsd.org
Sender: gnats-bugs-owner@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: pkg_info has a few problems using pax-as-tar
X-Send-Pr-Version: 3.95

>Number:         18912
>Category:       bin
>Synopsis:       pkg_info has a few problems using pax-as-tar
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 04 04:56:01 +0000 2002
>Closed-Date:    Thu Dec 19 14:19:02 +0000 2002
>Last-Modified:  Sun Dec 22 10:59:01 +0000 2002
>Originator:     grant beattie
>Release:        NetBSD 1.6K
>Organization:
>Environment:
System: NetBSD mofo 1.6K NetBSD 1.6K (MOFO) #0: Sun Nov 3 22:34:54 EST 2002 grant@mofo:/data1/netbsd/current/src/sys/arch/i386/compile/MOFO i386
Architecture: i386
Machine: i386
>Description:
running pkg_info on a binary pkg should return some information about the
package.

pkg_info calls tar with the 'p' flag regardless of the effective uid, pax
attempts to set uid/gid and fails:

% pkg_info xmms-sid-0.7.2.tgz
tar: Unable to set file uid/gid of +CONTENTS <Operation not permitted>
tar: Unable to set file uid/gid of +COMMENT <Operation not permitted>
tar: Unable to set file uid/gid of +DESC <Operation not permitted>
tar: Unable to set file uid/gid of +MTREE_DIRS <Operation not permitted>
tar: Unable to set file uid/gid of +BUILD_VERSION <Operation not permitted>
tar: Unable to set file uid/gid of +BUILD_INFO <Operation not permitted>
tar: Unable to set file uid/gid of +SIZE_PKG <Operation not permitted>
tar: Unable to set file uid/gid of +SIZE_ALL <Operation not permitted>
pkg_info: tar extract of /vnd/packages/All/xmms-sid-0.7.2.tgz failed!
pkg_info: error during unpacking, no info for 'xmms-sid-0.7.2.tgz' available

>How-To-Repeat:
pkg_info filename as non-root.

>Fix:
pkg_* should be made to understand pax exit codes, as this should
not be fatal.

cgd suggested pax should only print a single warning right at the end
if it fails to preserve permissions.

>Release-Note:
>Audit-Trail:

From: grant beattie <grant@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18912 CVS commit: basesrc/bin/pax
Date: Thu, 19 Dec 2002 16:02:55 +0200 (EET)

 Module Name:	basesrc
 Committed By:	grant
 Date:		Thu Dec 19 14:02:55 UTC 2002

 Modified Files:
 	basesrc/bin/pax: file_subs.c

 Log Message:
 Don't attempt to chown files if euid != 0, and make chown() non-fatal
 if it does fail.

 This addresses my PR bin/18912 (running pkg_info as non-root user on a
 binary package).


 To generate a diff of this commit:
 cvs rdiff -r1.25 -r1.26 basesrc/bin/pax/file_subs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: grant 
State-Changed-When: Thu Dec 19 06:03:13 PST 2002 
State-Changed-Why:  
pax has been fixed and pkg_info works correctly now. 

From: grant beattie <grant@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18912 CVS commit: othersrc/bootstrap-pkgsrc/pax
Date: Sun, 22 Dec 2002 12:58:46 +0200 (EET)

 Module Name:	othersrc
 Committed By:	grant
 Date:		Sun Dec 22 10:58:46 UTC 2002

 Modified Files:
 	othersrc/bootstrap-pkgsrc/pax: file_subs.c

 Log Message:
 sync with src:
 Don't attempt to chown files if euid != 0.

 This addresses my PR bin/18912 (running pkg_info as non-root user on a
 binary package).


 To generate a diff of this commit:
 cvs rdiff -r1.1.1.1 -r1.2 othersrc/bootstrap-pkgsrc/pax/file_subs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.