Subject: pkg/29221: pkg_install from 2004Q4 doesn't preserve file modes from binary packages
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Piotr Stolc <socrtp@soclab.eu.org>
List: pkgsrc-bugs
Date: 02/04/2005 03:22:00
>Number: 29221
>Category: pkg
>Synopsis: pkg_install from 2004Q4 doesn't preserve file modes from binary packages
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 04 03:22:00 +0000 2005
>Originator: Piotr Stolc
>Release: NetBSD 2.0.1
>Organization:
soclab
>Environment:
System: NetBSD s 2.0.1 NetBSD 2.0.1 (S) #2: Tue Jan 25 03:44:17 CET 2005 build@s:/build/src/sys/arch/i386/compile/S i386
Architecture: i386
Machine: i386
>Description:
pkg_add from pkgtools/pkg_install (20041209) doesn't preserve file modes
when installing from binary packages. This bug was fixed in -current pkgsrc
at 7/01/05, but it still exist in stable pkgsrc branch.
>How-To-Repeat:
pkg_add postfix[...].tgz
ls -l /usr/pkg/sbin/postqueue
>Fix:
upgrade to pkg_install from -current (20050106) or use this patch:
--- ftpio.c~ 2005-02-03 22:39:46.000000000 +0100
+++ ftpio.c 2005-02-03 22:39:45.000000000 +0100
@@ -1238,7 +1238,7 @@
errx(EXIT_FAILURE, "don't know how to decompress %s, sorry", pkg);
/* yes, this is gross, but needed for borken ftp(1) */
- (void) snprintf(cmd, sizeof(cmd), "get %s \"| ( cd %s; " TAR_CMD " %s %s -%sx -f - | tee /dev/stderr )\"\n",
+ (void) snprintf(cmd, sizeof(cmd), "get %s \"| ( cd %s; " TAR_CMD " %s %s -%sxp -f - | tee /dev/stderr )\"\n",
pkg, dir,
decompress_cmd != NULL ? "--use-compress-program" : "",
decompress_cmd != NULL ? decompress_cmd : "",
>Unformatted: