Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2000 01:02:29 +0400 (MSD)
From:      "Aleksandr A.Babaylov" <babolo@links.ru>
To:        DougB@gorean.org (Doug Barton)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: mergemaster RFC (long)
Message-ID:  <200009172102.BAA27585@aaz.links.ru>
In-Reply-To: <39C4475A.DBDA6C5@gorean.org> from "Doug Barton" at "Sep 16, 0 09:23:54 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009172102.BAA27585>