In the new tinderbox host I wanted to set up a shared CVS tree for me and lu_zero in a private container. For the cvs part, this can be easily achieved by using ACLs in such a way that both the users have read/write and execute if needed permissions (this gets tricky with umasks but nevermind that now). When you do commit that way, though, repoman commit will fail in this way: @@ -4,0 +5,4 @@ + 16 May 2012; Diego E. Pettenò <flameeyes@gentoo.org> -apcupsd-3.14.10.ebuild, + -files/apcupsd.init.2: + Remove old version. + Traceback (most recent call last): File "/usr/bin/repoman", line 2525, in <module> pretend=options.pretend) File "/usr/lib64/portage/pym/repoman/utilities.py", line 857, in UpdateChangeLog shutil.move(clnew_path, cl_path) File "/usr/lib64/portage/pym/portage/__init__.py", line 230, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) File "/usr/lib64/python2.7/shutil.py", line 299, in move copy2(src, real_dst) File "/usr/lib64/python2.7/shutil.py", line 129, in copy2 copystat(src, dst) File "/usr/lib64/python2.7/shutil.py", line 98, in copystat os.utime(dst, (st.st_atime, st.st_mtime)) OSError: [Errno 1] Operation not permitted: './ChangeLog' The reason is that it can't preserve the ownership if the ownership is not of the same user. Even most interesting is the fact that copy2() will fail _in a non-atomic way_ since the file is actually copied, but the permissions are not preserved!
shutil.move calls os.rename and falls back to shutil.copy2 if that fails. I wonder why os.rename would fail?
This looks a lot like bug #413397. Perhaps the correct error code isn't defined here either?
That was "ENOSUPP", here is "ENOPERM"... so different issue but still similar enough. For sure it sounds like Python's mainly at fault.
shutil.copy2 tries to preserve extended attributes (e.g. ACLs) only since Python 3.3. In /usr/lib64/python2.7/shutil.py in move() function apply: try: os.rename(src, real_dst) - except OSError: + except OSError as e: + print(e) if os.path.isdir(src): And show exception.
Changelogs are now obsolete, gone from the tree and even from the normal rsync tree (is an optional download, generated from git logs)