duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Failure running tests.


From: Scott Hannahs
Subject: Re: [Duplicity-talk] Failure running tests.
Date: Fri, 20 Sep 2019 18:20:54 -0400

Ken,

Ahh…  That make sense.

Not a python person, but the C routines should give a user temporary directory with better permissions.  See the man page for “confstr” and the variable “_CS_DARWIN_USER_TEMP_DIR”  This allows creation of temporary files and directories with read/write and correct group permissions.  These are in the /private/var/folders hierarchy.

The shell has also a utility (getconf) to get a user writeable folder using that method:
% getconf DARWIN_USER_TEMP_DIR
/var/folders/vp/g0v5g0m555z7448gjtzfrthc0000kr/C/
% ls -l /var/folders/vp/g0v5g0m555z7448gjtzfrthc0000kr/C
total 0
drwxr-xr-x  3 fink-bld  fink-bld   96 Apr 28 12:44 com.apple.DeveloperTools
drwx------  7 fink-bld  fink-bld  224 Apr 28 12:44 com.apple.trustd
drwx------  5 fink-bld  fink-bld  160 Aug 20 18:13 mds

This also has the added facility for automatic cleanup.  I think if space gets low this area is purged after 3 days?  But I try not to rely on that.  I am not sure if this is POSIX or BSD routine, but it might be a standard solution.

-Scott


On Sep 20, 2019, at 4:55 PM, Kenneth Loafman <address@hidden> wrote:

Scott,

Found the problem.  It's the way duplicity handles the /tmp directory.  You can see this yourself with:

$ mkdir /tmp/foo
$ ls -l /tmp

and observe that /tmp/foo user is you, but the group is wheel.  On Linux that would be your gid.

What's happening is that duplicity is building a sigtar file in /tmp, then copying it to testing/testfiles/cache, or trying to.  As soon as the copy is complete, duplicity tries to chown the sigtar  file to the same as the one in /tmp, which is test:wheel and test does not have the rights to set a wheel gid.

$ TMPDIR=~/tmp tox -e py37
works for all tests.  

I'm going to have to think about the changes needed, perhaps as simple as telling non-admin users to override TMPDIR.

On the second traceback, that was caused by Pythons poor exception reporting standards.  In some cases the args returned are (number, mee ssage), in others (message, number).  I tweaked it so it would look for the first string in the tuple and used that for the error message.  That's probably wrong in some cases.

...Ken



On Sat, Sep 14, 2019 at 1:35 PM Scott Hannahs <address@hidden> wrote:
That narrows it down!  That is great progress.

Thanks,
Scott

> On Sep 14, 2019, at 11:48 AM, Kenneth Loafman <address@hidden> wrote:
>
> Scott,
>
> I created a test user (non-admin) and the tests fail like yours.  This helps a lot.
>
> Will see what I can do.
>
> ...Ken
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]