Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2014 19:00:11 +0200
From:      olli hauer <ohauer@gmx.de>
To:        Chris Rees <crees@physics.org>
Cc:        svn-ports-head@freebsd.org, Baptiste Daroussin <bapt@FreeBSD.org>, svn-ports-all@freebsd.org, ports-committers@freebsd.org, Chris Rees <crees@FreeBSD.org>, Adam Weinberger <adamw@adamw.org>
Subject:   Re: svn commit: r362282 - head/audio/musicpd
Message-ID:  <53CD471B.9060807@gmx.de>
In-Reply-To: <221FF4D0-F202-48C5-9A52-94BB05CF928E@adamw.org>
References:  <201407192131.s6JLVS8t088706@svn.freebsd.org> <20140720010437.GT28314@ivaldir.etoilebsd.net> <98131e5d-843d-4d2d-97e8-0b7d304529ac@email.android.com> <44E9C6BB-2725-4DF8-8AC2-7A2AF7F6089B@adamw.org> <280acdef-8b82-452a-bb2a-49d2bc5c96de@email.android.com> <221FF4D0-F202-48C5-9A52-94BB05CF928E@adamw.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2014-07-21 16:59, Adam Weinberger wrote:
> On 21 Jul, 2014, at 10:46, Chris Rees <crees@physics.org> wrote:
> 
>>>> What would be really nice would be a chmod u+w on the config file
>>> once copied over!
>>>
>>> @mode 666
>>> @sample etc/musicpd.conf.sample
>>> @mode
>>>
>>> If you only want it on the non-sample, you can also add
>>> @exec chmod 444 %D/etc/musicpd.conf.sample
>>>
>>
>> That's really not the point I'm making.
>>
>> I have always been annoyed by the readonly config files, even for root- I was suggesting a global solution.
> 
> Ah, I see what you mean. Yes, that is definitely annoying. I’d be fully behind people not setting u-w on files meant to be edited.
> 
>> Also, 666??? 664/644.
> 
> Sorry, I misread. I thought you said o+w. I was wondering why you’d want that too :-P
> 
> # Adam

+1 to set u+w on sample files.

The following diff will do the work.

Index: Keywords/sample.yaml
===================================================================
--- Keywords/sample.yaml        (revision 362447)
+++ Keywords/sample.yaml        (working copy)
@@ -20,6 +20,7 @@
   target_file="${sample_file%.sample}"
   if ! [ -f "${target_file}" ]; then
     /bin/cp -p "${sample_file}" "${target_file}"
+    /bin/chmod -f u+w "${target_file}"
   fi
 pre-deinstall: |
   sample_file="%D/%@"



Even this change is outside of the usr/ports it affects a many, should the PORTREVISION incremented on all ports installing a sample file after applying such a patch??
I ask because the current discussion about PORTREVISION bump for simple fixes.

-- 
olli



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