From owner-freebsd-hackers Sun Sep 17 14: 2:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from aaz.links.ru (aaz.links.ru [193.125.152.37]) by hub.freebsd.org (Postfix) with ESMTP id 32A8537B424 for ; Sun, 17 Sep 2000 14:02:36 -0700 (PDT) Received: (from babolo@localhost) by aaz.links.ru (8.9.3/8.9.3) id BAA27585; Mon, 18 Sep 2000 01:02:29 +0400 (MSD) Message-Id: <200009172102.BAA27585@aaz.links.ru> Subject: Re: mergemaster RFC (long) In-Reply-To: <39C4475A.DBDA6C5@gorean.org> from "Doug Barton" at "Sep 16, 0 09:23:54 pm" To: DougB@gorean.org (Doug Barton) Date: Mon, 18 Sep 2000 01:02:29 +0400 (MSD) Cc: freebsd-hackers@FreeBSD.ORG From: "Aleksandr A.Babaylov" MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug Barton writes: .......... > And the last of the ideas I want feedback on is related to the problem > of determining permissions on the files to be installed. To my knowledge > there is no existing C utility that will tell you the octal permissions ports/sysutils/stat, for example 0cicuta~(12)>stat -f'%p' . 0755/drwxr-xr-x But I have stat patched to delete File: \"%s\" clause from printing if no need for it. It is short program and useful in base system 0cicuta~(13)>ls -al `which stat` 6 -r-xr-xr-x 1 root wheel 5720 26 ΑΧΗ 00:58 /usr/local/bin/stat* > on a file, and preferably also combine them with the umask to spit out > what the permissions should be. My current solution for that is a couple > of one line perl scripts, but I really want to eliminate that as my > contribution to the "don't make anything in the base depend on perl" > campaign. I have written a little tiny program in C to do this which > could be included along with mergemaster, what do people think? It is > possible to do the same thing in sh, but it's very cumbersome, unless > someone can suggest some combination of existing utilities that I > haven't considered yet. The main problem with doing it in sh (which I've > done in the past) is that the umask effectively means "different" things > if it's a binary/directory or if it's a regular file, so even though > getting the permissions is easy (with ls, whatever) combining it with > the umask is hard. Of course, I could always take that whole section > out, and just install the files with the permissions created by > /usr/src/etc/Makefile. I see less need now of custom permissions than I > did ages ago, but what do others think? .............. -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message