Re: Could not open Portfile

2016-09-16 Thread Joshua Root

On 2016-9-17 00:04 , Rainer Müller wrote:

On 2016-09-16 14:20, Craig Treleaven wrote:

I’ve hit this scenario a couple of times.  Am I doing something wrong with svn 
patch?


What is your umask set to? From the permissions it looks like this is
with umask 0077.

I encountered the same problem before. svn patch does not preserve the
permissions of the existing files. Actually this behavior is not even
specific to svn patch, other commands such as svn revert behave the same
way. svn creates a new temporary file with umask applied, deletes the
existing file and moves the new file in place.

Personally, I use ACLs on my ports directory to automatically grant read
permissions to everyone on new files. This also resolves this problem
with svn patch for me.

chmod -R +a "group:everyone allow
read,execute,list,search,file_inherit,directory_inherit" ~/ports

It would be nice to have a better solution for this problem, but the
actual bug is in Subversion.


I reported this upstream a while ago with respect to svn commit and it 
was fixed. If you report these other affected commands and reference the 
fix for commit they should be able to fix them pretty easily too.




- Josh
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Could not open Portfile

2016-09-16 Thread Craig Treleaven

> On Sep 16, 2016, at 10:04 AM, Rainer Müller  wrote:
> 
> On 2016-09-16 14:20, Craig Treleaven wrote:
>> I’ve hit this scenario a couple of times.  Am I doing something wrong with 
>> svn patch?
> 
> What is your umask set to? From the permissions it looks like this is
> with umask 0077.
> 
> I encountered the same problem before. svn patch does not preserve the
> permissions of the existing files. Actually this behavior is not even
> specific to svn patch, other commands such as svn revert behave the same
> way. svn creates a new temporary file with umask applied, deletes the
> existing file and moves the new file in place.
> 
> Personally, I use ACLs on my ports directory to automatically grant read
> permissions to everyone on new files. This also resolves this problem
> with svn patch for me.
> 
> chmod -R +a "group:everyone allow
> read,execute,list,search,file_inherit,directory_inherit" ~/ports
> 
> It would be nice to have a better solution for this problem, but the
> actual bug is in Subversion.
> 
Thanks Rainer!  I thought maybe I was just missing a step, somewhere.  I found 
a ‘sudo chmod 0666’ on the affected Portfiles allowed me to go ahead.  

Craig
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Could not open Portfile

2016-09-16 Thread Rainer Müller
On 2016-09-16 14:20, Craig Treleaven wrote:
> I’ve hit this scenario a couple of times.  Am I doing something wrong with 
> svn patch?

What is your umask set to? From the permissions it looks like this is
with umask 0077.

I encountered the same problem before. svn patch does not preserve the
permissions of the existing files. Actually this behavior is not even
specific to svn patch, other commands such as svn revert behave the same
way. svn creates a new temporary file with umask applied, deletes the
existing file and moves the new file in place.

Personally, I use ACLs on my ports directory to automatically grant read
permissions to everyone on new files. This also resolves this problem
with svn patch for me.

chmod -R +a "group:everyone allow
read,execute,list,search,file_inherit,directory_inherit" ~/ports

It would be nice to have a better solution for this problem, but the
actual bug is in Subversion.

Rainer
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Could not open Portfile

2016-09-16 Thread Craig Treleaven
Hi:

Fresh install of MacPorts on a new VM with an svn checkout of trunk, I get this 
error:

$ sudo port install mariadb-server
Password:
Error: Unable to execute port: Could not open file: 
/Users/macmyth/mp/trunk/dports/databases/mariadb/Portfile

I had applied a patch to mariadb, ala:

$ svn patch 
/Volumes/Clooney/Test_installers/patch_port_mariadb-server_startupitem_and_pkg_2016Sep14.diff
 
U Portfile
A files/org.macports.mariadb-server.plist
A files/postinstall
A files/preinstall

The permissions before running the patch were:

$ pwd
/Users/macmyth/mp/trunk/dports/databases/mariadb
$ ls -l
total 24
-rw-r--r--  1 macmyth  staff  10021 16 Sep 07:32 Portfile
drwxr-xr-x  7 macmyth  staff238 16 Sep 07:32 files

After the patch:

$ ls -l
total 24
-rw---   1 macmyth  staff  11885 16 Sep 08:02 Portfile
drwxr-xr-x  10 macmyth  staff340 16 Sep 08:02 files

I did update sources.conf to include:

file:///Users/macmyth/mp/trunk/dports [default]
rsync://rsync.macports.org/release/tarballs/ports.tar

I’ve hit this scenario a couple of times.  Am I doing something wrong with svn 
patch?

Craig

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev