Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-1309

pdk build should sanitise file modes in the tarball

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.12.0
    • Component/s: None
    • Environment:

      OpenSUSE 15.0
      PDK 1.8.0 installed from a native package.

    • Template:
    • Acceptance Criteria:
      • All files in the tarball generated by pdk build should at least have 0644 permissions and all directories 0755
    • Team:
      Puppet Developer Experience
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      `pdk build` will now ensure that all files and directories are added to the package with permissions that allow anyone to read them when the package is extracted.
    • QA Risk Assessment:
      Needs Assessment

      Description

      (Import from GH issue #618)

      pdk build creates a tar file based on the current file rights in my repository. I'm working with a umask of 0027, so other has no access on the files and directories and these rights will be stored in the tar file as is. If you use r10k (and probably also in other configurations) this can cause problems, e.g. here.

      To Reproduce

      1. Create a new file in your module directory with file rights 0640
      2. Build your module package with pdk build
      3. Examine the tar file (tar -xvf pkg/...)

      Expected behavior
      PDK should adjust the file and directory rights when running pdk build, so that group and other can access them.

        Attachments

          Activity

            People

            Assignee:
            tim.sharpe Tim Sharpe
            Reporter:
            tim.sharpe Tim Sharpe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support