error during installation from jenkins tarball: can't copy 'keystone/common/sql/migrate_repo/migrate.cfg': doesn't exist or not a regular file

Bug #937265 reported by Christian Berendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Dan Prince

Bug Description

in setup.py:

      data_files=[
          ('keystone/common/sql/migrate_repo',
           ['keystone/common/sql/migrate_repo/migrate.cfg'])]
      )

but there is no file keystone/common/sql/migrate_repo/migrate.cfg in the latest tarball (keystone-2012.1~e4~20120220.1985.tar.gz, https://jenkins.openstack.org/job/keystone-tarball/386/) provided on jenkins.openstack.org

berendt@mango ~/Downloads/keystone-2012.1 % stat keystone/common/sql/migrate_repo/migrate.cfg
stat: cannot stat `keystone/common/sql/migrate_repo/migrate.cfg': No such file or directory

"keystone/common/sql/migrate_repo/migrate.cfg" is included in the git repository:

berendt@mango ~/Documents/repositories/keystone (git)-[master] % stat keystone/common/sql/migrate_repo/migrate.cfg
  File: `keystone/common/sql/migrate_repo/migrate.cfg'
  Size: 1235 Blocks: 8 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 919154 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ berendt) Gid: ( 1000/ berendt)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2012-02-20 22:41:04.337768132 +0100
Modify: 2012-02-20 22:41:04.337768132 +0100
Change: 2012-02-20 22:41:04.337768132 +0100
 Birth: -

summary: - error during installation: can't copy
+ error during installation from jenkins tarball: can't copy
'keystone/common/sql/migrate_repo/migrate.cfg': doesn't exist or not a
regular file
Alan Pevec (apevec)
Changed in keystone:
status: New → Confirmed
Dan Prince (dan-prince)
Changed in keystone:
assignee: nobody → Dan Prince (dan-prince)
Revision history for this message
Dan Prince (dan-prince) wrote :

I think this is being addressed in https://review.openstack.org/#change,4351.

Revision history for this message
Dan Prince (dan-prince) wrote :

I'm going to propose we revert the 'data_files' fix which seems to be the wrong way to get migrate.cfg into the release tarball.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/4353

Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/4357

Revision history for this message
Dan Prince (dan-prince) wrote :

Okay. The fix for this seems to be to set include_package_data=True.

Using data_files is problematic when building RPMs in that it ultimately copies migrate.cfg to:

/usr/keystone/common/sql/migrate_repo/migrate.cfg

When it should be something like:

/usr/lib/python2.7/site-packages/keystone/common/sql/migrate_repo/migrate.cfg

---

I would add that both Nova and Glance do the same in their setup.py files.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/4353
Committed: http://github.com/openstack/keystone/commit/460504f274ed5c066303f41187afaa8c5b3918b8
Submitter: Jenkins
Branch: master

commit 460504f274ed5c066303f41187afaa8c5b3918b8
Author: Dan Prince <email address hidden>
Date: Tue Feb 21 12:13:42 2012 -0500

    Remove data_files section from setup.py.

    'data_files' is probably not the best way to get migrate.cfg into
    the tarball. Updating MANIFEST.in seems to work just fine.

    Fixes LP Bug #937265

    Change-Id: I94e89271660baca4408df470a122e127540a4131

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/4357
Committed: http://github.com/openstack/keystone/commit/faf6866c17255cc03a26119b77d5c7e9a6a04be6
Submitter: Jenkins
Branch: master

commit faf6866c17255cc03a26119b77d5c7e9a6a04be6
Author: Dan Prince <email address hidden>
Date: Tue Feb 21 12:13:42 2012 -0500

    Set include_package_data=True in setup.py.

    Fixes issue where migrate.cfg was not getting installed.

    Also, remove the previous 'data_files' fix from setup.py as it causes files
    to get copied to the wrong location on install.

    Fixes LP Bug #937265

    Change-Id: I94e89271660baca4408df470a122e127540a4131

    Updates.

    Change-Id: I5c4744a14719393e4dc35c5ef6a292c57a81527c

Joseph Heck (heckj)
Changed in keystone:
milestone: none → essex-4
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.