This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: reset owner/group to root for distutils tarballs
Type: enhancement Stage: patch review
Components: Distutils Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: 6856 Superseder:
Assigned To: tarek Nosy List: akuchling, bheemesh, jaraco, ncoghlan, python-dev, tarek, till
Priority: normal Keywords:

Created on 2009-07-18 16:14 by till, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
unnamed bheemesh, 2009-10-06 12:39
3.4-patch.txt akuchling, 2013-11-10 23:42 review
Messages (19)
msg90685 - (view) Author: Till Maas (till) Date: 2009-07-18 16:14
Please allow to create tarballs with owner/group of files be set to root.

One possible fix is to change cmd in distutils/archive_util.py to this:

cmd = ["tar", "-cf", archive_name, "--owner=root", "--group=root", base_dir]
msg90721 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-07-20 05:12
what would be the use case for that ?
msg90880 - (view) Author: Till Maas (till) Date: 2009-07-24 12:08
I want to create uniform tarballs, independent of which username was
used to create the tarball.
msg92346 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-09-07 07:41
We can add two options to the commands that create tarballs:

- owner
- group
 

but we first need to add this capacity to the tarfile module because
right now the API doesn't allow you to add files with custom uid and gid.

I am going to add another issue with a proposal for this.
msg92349 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-09-07 07:48
#6856 created.
msg92659 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-09-15 22:18
#6856 was added by Lars, so I can move forward and work on this one.
msg93462 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-10-02 23:58
done in r75192 and r75194. Thanks Till !
msg93638 - (view) Author: Bheemesh (bheemesh) Date: 2009-10-06 10:51
Hello Tarek,

done in r75192 and r75194. Thanks Till !

Can you please tell me how to get this correction into use?
msg93642 - (view) Author: Bheemesh (bheemesh) Date: 2009-10-06 12:03
I just took download of the latest python 2.6.3 which was updated on 2nd
OCT 09, and found that while tarball creation everything looks OK, but
when we un-tar the archive the permissions goes back to the current user
logged in. Can this be set to the user mentioned while archive was created?
msg93644 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-10-06 12:29
Hi Bheemesh,

This is a new feature, so it was added in the current trunk that will
become 2.7 and 3.2.

So unfortunately, you can't have it in any 2.6 release.

A workaround is to create your own sdist command, that includes the
changes made in 2.7.
msg93646 - (view) Author: Bheemesh (bheemesh) Date: 2009-10-06 12:39
HI Tarek,

Thanks very much for a quick reply here.
since i am new to this , can you help me with sdist command to have the
latest changes?

Best Regards,
Bheemesh

On Tue, Oct 6, 2009 at 5:59 PM, Tarek Ziadé <report@bugs.python.org> wrote:

>
> Tarek Ziadé <ziade.tarek@gmail.com> added the comment:
>
> Hi Bheemesh,
>
> This is a new feature, so it was added in the current trunk that will
> become 2.7 and 3.2.
>
> So unfortunately, you can't have it in any 2.6 release.
>
> A workaround is to create your own sdist command, that includes the
> changes made in 2.7.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue6516>
> _______________________________________
>
msg202578 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2013-11-10 21:52
This change was rolled back before the release of 3.2, so only exists in 2.7. See issue19544 for details.
msg202586 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2013-11-10 23:42
Here's an updated patch, to be applied against the default branch.
msg202948 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2013-11-15 12:41
Patch looks good to me.
msg202965 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-15 18:07
New changeset b9c9c4b2effe by Andrew Kuchling in branch 'default':
Issue #19544 and Issue #6516: Restore support for --user and --group parameters to sdist command as found in Python 2.7 and originally slated for Python 3.2 but accidentally rolled back as part of the distutils2 rollback. Closes Issue #6516.
http://hg.python.org/cpython/rev/b9c9c4b2effe
msg202972 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-15 22:08
New changeset b08868fd5994 by Christian Heimes in branch 'default':
Issue #19544 and Issue #6516: quick workaround for failing builds
http://hg.python.org/cpython/rev/b08868fd5994
msg202974 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-15 22:13
New changeset 015463176d2e by Victor Stinner in branch 'default':
Issue #19544, #6516: no need to catch AttributeError on import pwd/grp
http://hg.python.org/cpython/rev/015463176d2e
msg207108 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-12-30 20:40
New changeset 83f12a9593db by Zachary Ware in branch 'default':
Issue #19544, #6516: check ZLIB_SUPPORT, not zlib (which might not be bound)
http://hg.python.org/cpython/rev/83f12a9593db
msg207112 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-12-30 21:09
New changeset 2a872126f4a1 by Zachary Ware in branch 'default':
Issue #19544, #6516: check ZLIB_SUPPORT, not zlib (which might not be bound)
http://hg.python.org/cpython/rev/2a872126f4a1
History
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50765
2013-12-30 21:09:26python-devsetmessages: + msg207112
2013-12-30 20:40:06python-devsetmessages: + msg207108
2013-11-15 22:13:27python-devsetmessages: + msg202974
2013-11-15 22:08:29python-devsetmessages: + msg202972
2013-11-15 18:08:00jaracosetstatus: open -> closed
resolution: accepted -> fixed
2013-11-15 18:07:00python-devsetnosy: + python-dev
messages: + msg202965
2013-11-15 12:41:54ncoghlansetnosy: + ncoghlan
messages: + msg202948
2013-11-10 23:45:49akuchlingsetversions: + Python 3.4, - Python 2.7, Python 3.2
2013-11-10 23:42:24akuchlingsetfiles: + 3.4-patch.txt

nosy: + akuchling
messages: + msg202586

stage: patch review
2013-11-10 22:53:50jaracosetstatus: closed -> open
2013-11-10 21:52:51jaracosetnosy: + jaraco
messages: + msg202578
2009-10-06 12:39:28bheemeshsetfiles: + unnamed

messages: + msg93646
2009-10-06 12:29:47tareksetmessages: + msg93644
2009-10-06 12:03:03bheemeshsetmessages: + msg93642
2009-10-06 10:51:21bheemeshsetnosy: + bheemesh
messages: + msg93638
2009-10-02 23:58:19tareksetstatus: open -> closed

messages: + msg93462
2009-09-17 11:08:31tareksetpriority: normal
2009-09-15 22:18:12tareksetresolution: accepted
messages: + msg92659
2009-09-07 07:48:07tareksetdependencies: + allow setting uid and gid when creating tar files
messages: + msg92349
2009-09-07 07:41:09tareksetmessages: + msg92346
versions: + Python 2.7, Python 3.2, - Python 2.6
2009-07-24 12:08:39tillsetmessages: + msg90880
2009-07-20 05:12:44tareksetmessages: + msg90721
2009-07-18 16:14:57tillcreate