svn commit: r362282 - head/audio/musicpd

olli hauer ohauer at gmx.de
Mon Jul 21 17:00:17 UTC 2014


On 2014-07-21 16:59, Adam Weinberger wrote:
> On 21 Jul, 2014, at 10:46, Chris Rees <crees at 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


More information about the svn-ports-head mailing list