Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset owner/group to root for distutils tarballs #50765

Closed
till mannequin opened this issue Jul 18, 2009 · 19 comments
Closed

reset owner/group to root for distutils tarballs #50765

till mannequin opened this issue Jul 18, 2009 · 19 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@till
Copy link
Mannequin

till mannequin commented Jul 18, 2009

BPO 6516
Nosy @akuchling, @jaraco, @ncoghlan, @tarekziade
Dependencies
  • bpo-6856: allow setting uid and gid when creating tar files
  • Files
  • unnamed
  • 3.4-patch.txt
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tarekziade'
    closed_at = <Date 2013-11-15.18:08:00.964>
    created_at = <Date 2009-07-18.16:14:57.845>
    labels = ['type-feature', 'library']
    title = 'reset owner/group to root for distutils tarballs'
    updated_at = <Date 2013-12-30.21:09:26.972>
    user = 'https://bugs.python.org/till'

    bugs.python.org fields:

    activity = <Date 2013-12-30.21:09:26.972>
    actor = 'python-dev'
    assignee = 'tarek'
    closed = True
    closed_date = <Date 2013-11-15.18:08:00.964>
    closer = 'jaraco'
    components = ['Distutils']
    creation = <Date 2009-07-18.16:14:57.845>
    creator = 'till'
    dependencies = ['6856']
    files = ['15054', '32571']
    hgrepos = []
    issue_num = 6516
    keywords = []
    message_count = 19.0
    messages = ['90685', '90721', '90880', '92346', '92349', '92659', '93462', '93638', '93642', '93644', '93646', '202578', '202586', '202948', '202965', '202972', '202974', '207108', '207112']
    nosy_count = 7.0
    nosy_names = ['akuchling', 'jaraco', 'ncoghlan', 'tarek', 'till', 'bheemesh', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue6516'
    versions = ['Python 3.4']

    @till
    Copy link
    Mannequin Author

    till mannequin commented Jul 18, 2009

    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]

    @till till mannequin assigned tarekziade Jul 18, 2009
    @till till mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jul 18, 2009
    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Jul 20, 2009

    what would be the use case for that ?

    @till
    Copy link
    Mannequin Author

    till mannequin commented Jul 24, 2009

    I want to create uniform tarballs, independent of which username was
    used to create the tarball.

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Sep 7, 2009

    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.

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Sep 7, 2009

    bpo-6856 created.

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Sep 15, 2009

    bpo-6856 was added by Lars, so I can move forward and work on this one.

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Oct 2, 2009

    done in r75192 and r75194. Thanks Till !

    @tarekziade tarekziade mannequin closed this as completed Oct 2, 2009
    @bheemesh
    Copy link
    Mannequin

    bheemesh mannequin commented Oct 6, 2009

    Hello Tarek,

    done in r75192 and r75194. Thanks Till !

    Can you please tell me how to get this correction into use?

    @bheemesh
    Copy link
    Mannequin

    bheemesh mannequin commented Oct 6, 2009

    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?

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Oct 6, 2009

    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.

    @bheemesh
    Copy link
    Mannequin

    bheemesh mannequin commented Oct 6, 2009

    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\>


    @jaraco
    Copy link
    Member

    jaraco commented Nov 10, 2013

    This change was rolled back before the release of 3.2, so only exists in 2.7. See bpo-19544 for details.

    @jaraco jaraco reopened this Nov 10, 2013
    @akuchling
    Copy link
    Member

    Here's an updated patch, to be applied against the default branch.

    @ncoghlan
    Copy link
    Contributor

    Patch looks good to me.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 15, 2013

    New changeset b9c9c4b2effe by Andrew Kuchling in branch 'default':
    Issue bpo-19544 and Issue bpo-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 bpo-6516.
    http://hg.python.org/cpython/rev/b9c9c4b2effe

    @jaraco jaraco closed this as completed Nov 15, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 15, 2013

    New changeset b08868fd5994 by Christian Heimes in branch 'default':
    Issue bpo-19544 and Issue bpo-6516: quick workaround for failing builds
    http://hg.python.org/cpython/rev/b08868fd5994

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 15, 2013

    New changeset 015463176d2e by Victor Stinner in branch 'default':
    Issue bpo-19544, bpo-6516: no need to catch AttributeError on import pwd/grp
    http://hg.python.org/cpython/rev/015463176d2e

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 30, 2013

    New changeset 83f12a9593db by Zachary Ware in branch 'default':
    Issue bpo-19544, bpo-6516: check ZLIB_SUPPORT, not zlib (which might not be bound)
    http://hg.python.org/cpython/rev/83f12a9593db

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 30, 2013

    New changeset 2a872126f4a1 by Zachary Ware in branch 'default':
    Issue bpo-19544, bpo-6516: check ZLIB_SUPPORT, not zlib (which might not be bound)
    http://hg.python.org/cpython/rev/2a872126f4a1

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants