From owner-freebsd-bugs Tue Sep 11 3:20: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B4B3537B401 for ; Tue, 11 Sep 2001 03:20:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8BAK0G02820; Tue, 11 Sep 2001 03:20:00 -0700 (PDT) (envelope-from gnats) Received: from rj.sgi.com (rj.SGI.COM [204.94.215.100]) by hub.freebsd.org (Postfix) with ESMTP id 7F7EC37B40B for ; Tue, 11 Sep 2001 03:14:21 -0700 (PDT) Received: from yog-sothoth.sgi.com (eugate.neu.sgi.com [144.253.131.5]) by rj.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.0) with ESMTP id f8BAEK522773 for <@rj.corp.sgi.com:FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Sep 2001 03:14:20 -0700 Received: from sgiger.munich.sgi.com (sgiger.munich.sgi.com [144.253.192.2]) by yog-sothoth.sgi.com (980305.SGI.8.8.8-aspam-6.2/980304.SGI-aspam-europe) via SMTP id MAA303092 for <@eugate.sgi.com:FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Sep 2001 12:14:28 +0200 (CEST) mail_from (gwk@hunter.munich.sgi.com) Received: from cuckoo.munich.sgi.com (cuckoo.munich.sgi.com [144.253.192.109]) by sgiger.munich.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA00906 for ; Tue, 11 Sep 2001 12:13:48 +0200 Received: from hunter.munich.sgi.com (hunter.munich.sgi.com [144.253.197.18]) by cuckoo.munich.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id MAA30773 for ; Tue, 11 Sep 2001 12:13:32 +0200 (CEST) Received: (from gwk@localhost) by hunter.munich.sgi.com (8.11.5/8.11.5) id f8BADT211538; Tue, 11 Sep 2001 12:13:29 +0200 (CEST) (envelope-from gwk) Message-Id: <200109111013.f8BADT211538@hunter.munich.sgi.com> Date: Tue, 11 Sep 2001 12:13:29 +0200 (CEST) From: "Georg-W. Koltermann" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/30507: pkg_add fails with "chown: bin.bin: illegal user name" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 30507 >Category: bin >Synopsis: pkg_add fails with "chown: bin.bin: illegal user name" >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 11 03:20:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Georg-W. Koltermann >Release: FreeBSD 5.0-CURRENT i386 >Organization: SGI >Environment: System: FreeBSD hunter.munich.sgi.com 5.0-CURRENT FreeBSD 5.0-CURRENT #25: Mon Aug 20 22:18:51 CEST 2001 root@hunter.munich.sgi.com:/usr/obj/usr/src/sys/HUNTER i386 >Description: The pkg_add utility uses an old syntax (userid.groupid instead of userid:groupid) when changing user and group after the install. This causes a "chown: bin.bin: illegal user name" or some such whenever you install a package which has both @owner and @group directives, e.g. openmotif-devel: hunter# make install ===> Installing for open-motif-devel-2.1.30 ===> open-motif-devel-2.1.30 depends on shared library: X11.6 - found Installing Open Motif 2.1.30 development... chown: bin.bin: illegal user name pkg_add: couldn't change owner/group of ''usr/X11R6/bin/uil' ' to 'bin.bin' chown: bin.bin: illegal user name ...and so on. See attached fix. >How-To-Repeat: Try to do a pkg_add for a package which has both @owner and @group directives, e.g. open-motif-devel. >Fix: --- usr.sbin/pkg_install/add/futil.c.old Tue Sep 11 12:02:31 2001 +++ usr.sbin/pkg_install/add/futil.c Tue Sep 11 11:58:26 2001 @@ -83,7 +83,7 @@ if (vsystem("cd %s && chmod -R %s %s", cd_to, Mode, arg)) warnx("couldn't change modes of '%s' to '%s'", arg, Mode); if (Owner && Group) { - if (vsystem("cd %s && chown -R %s.%s %s", cd_to, Owner, Group, arg)) + if (vsystem("cd %s && chown -R %s:%s %s", cd_to, Owner, Group, arg)) warnx("couldn't change owner/group of '%s' to '%s.%s'", arg, Owner, Group); return; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message