Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-23454

macdeployqt does not ensure the binaries it copies into the .app bundle are writable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • None
    • 4.8.0
    • None
    • Mac OS X 10.7.2, Qt 4.8.0
    • macOS

    Description

      If the Qt .framework binaries and plugins are read-only, macdeployqt when copying the files into the app bundle does not ensure the newly created copies are writable by the current user. This causes the step of running install_name_tool to fail on said frameworks and plugins because there is no write access on the filesystem permissions.

      In our specific use case, this is a problem because we store the Qt binaries in Perforce which marks all files as read-only unless explicitly checked out for editing/modification. We hadn't run into it previously because versions of Qt prior to 4.8, there were both 32 and 64-bit versions shipped in the Qt framework installer and we just used that for development. Qt 4.8.0 changed that and now only ships the 64-bit version of the mac frameworks thus forcing us to compile it ourselves for 32- and 64-bit and keep the resulting binaries in Perforce.

      I've supplied a patch as an attachment to this case. The patch modifies the copyFilePrintStatus() method to set the user write permission on the newly copied file if and only if it is not currently writable by the user.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-23454
          # Subject Branch Project Status CR V

          Activity

            People

              sorvig Morten Sørvig
              glimberg Grant Limberg
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes