Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-4996

Update validate_drp for El Capitan

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Validation
    • Labels:
      None
    • Story Points:
      1
    • Team:
      Alert Production

      Description

      validate_drp does not work on El Capitan due to SIP (System Integrity Protection) stripping DYLD_LIBRARY_PATH from shell scripts. The simple fix is to add

      export DYLD_LIBRARY_PATH=${LSST_LIBRARY_PATH}
      

      near the top of the scripts.

        Attachments

          Activity

          Hide
          rowen Russell Owen added a comment - - edited

          I am willing to back off as far as:

          # OS X El Capitan swallows DYLD_LIBRARY_PATH so we use the duplicate in LSST_LIBRARY_PATH
          if [[ $(uname -s) = Darwin* ]]; then
              export DYLD_LIBRARY_PATH=$LSST_LIBRARY_PATH
          fi
          

          or

          # OS X El Capitan swallows DYLD_LIBRARY_PATH so we use the duplicate in LSST_LIBRARY_PATH
          if [[ -z "$DYLD_LIBRARY_PATH" ]]; then
              export DYLD_LIBRARY_PATH=$LSST_LIBRARY_PATH
          fi
          

          but am very strongly opposed to doing both. This code will potentially show up in a lot of places, and there is no need to get fancy. If we do find a mistake in it, it's going to be a big headache to fix. DYDL_LIBRARY_PATH is ignored on linux and can always be set on darwin so the simplest one-liner is my personal preference. The one-liner will show mistakes in setting LSST_LIBRARY_PATH on Yosemite, which is a small vote in its favor.

          Show
          rowen Russell Owen added a comment - - edited I am willing to back off as far as: # OS X El Capitan swallows DYLD_LIBRARY_PATH so we use the duplicate in LSST_LIBRARY_PATH if [[ $(uname -s) = Darwin* ]]; then export DYLD_LIBRARY_PATH=$LSST_LIBRARY_PATH fi or # OS X El Capitan swallows DYLD_LIBRARY_PATH so we use the duplicate in LSST_LIBRARY_PATH if [[ -z "$DYLD_LIBRARY_PATH" ]]; then export DYLD_LIBRARY_PATH=$LSST_LIBRARY_PATH fi but am very strongly opposed to doing both. This code will potentially show up in a lot of places, and there is no need to get fancy. If we do find a mistake in it, it's going to be a big headache to fix. DYDL_LIBRARY_PATH is ignored on linux and can always be set on darwin so the simplest one-liner is my personal preference. The one-liner will show mistakes in setting LSST_LIBRARY_PATH on Yosemite, which is a small vote in its favor.
          Hide
          ktl Kian-Tat Lim added a comment -

          I'm slightly reluctant to assume that we will forever use LD/LSST/DYLD_LIBRARY_PATH. I have hopes that sometime in the perhaps-distant future that we could get rid of it. So if we choose one of Russell's two, I guess I'd prefer the second and not the one-liner.

          Show
          ktl Kian-Tat Lim added a comment - I'm slightly reluctant to assume that we will forever use LD/LSST/DYLD_LIBRARY_PATH. I have hopes that sometime in the perhaps-distant future that we could get rid of it. So if we choose one of Russell's two, I guess I'd prefer the second and not the one-liner.
          Hide
          rowen Russell Owen added a comment -

          I'm happy to go with only overwriting DYLD_LIBRARY_PATH if it doesn't exist (though I'm not sure I see any connection between which option we choose and whether we use these paths in the future). I rebased and pushed that change.

          I hope we will move away from such paths in the future.

          Show
          rowen Russell Owen added a comment - I'm happy to go with only overwriting DYLD_LIBRARY_PATH if it doesn't exist (though I'm not sure I see any connection between which option we choose and whether we use these paths in the future). I rebased and pushed that change. I hope we will move away from such paths in the future.
          Hide
          wmwood-vasey Michael Wood-Vasey added a comment -

          I'm fine with this. Merge it.

          Show
          wmwood-vasey Michael Wood-Vasey added a comment - I'm fine with this. Merge it.
          Hide
          rowen Russell Owen added a comment -

          Merged and pushed. Also I rebased DM-4692 to the new master and pushed that.

          Show
          rowen Russell Owen added a comment - Merged and pushed. Also I rebased DM-4692 to the new master and pushed that.

            People

            • Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Watchers:
              Kian-Tat Lim, Michael Wood-Vasey, Russell Owen, Tim Jenness
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: