Skip to main content
Solved

Replace files in a package?

  • September 17, 2020
  • 3 replies
  • 0 views

Forum|alt.badge.img+10

I have a package that I need to replace/edit a couple of files in, is there a quick/easy way to do this without having to install the package to its absolute destination location?

Specifically, I have a package that contains a folder "/Library/Application Support/ABMaintainer" with a binary file ABMaintainer and a plist file com.abtutor.permanentPreferences.plist, I need to be able to replace those two files with the newest versions without having to actually copy them locally to their final "/Library/Application Support/ABMaintainer" location on my Mac.

I tried using Composer but it didn't seem like it would let me replace the files unless I had them already in their destination locations.

Best answer by sdagley

@DanJ_LRSFC Did you create the package in Composer on your Mac? If not you can use the Convert to Source button in Composer. Just find the files you want to replace in the Composer window for the package and drag the new files into the appropriate spots in the package structure. They don't have to be in the actual locations on your Mac. Just be sure to reset the permissions after you drag the new files into Composer.

View original
Did this topic help you find an answer to your question?

Forum|alt.badge.img+9
  • Valued Contributor
  • September 17, 2020

i dont know if this will work or help for this specific case, but for something like Cisco AnyConnect I used pkgutil

(assuming the pkg is on the desktop)

cd ~/Desktop
pkgutil --expand PackageName.pkg ~/Desktop/packagename-expanded (this will create a new folder with the pkg files)
pkgutil --flatten ~/Desktop/packagename-expanded ~/Desktop/PackageName.pkg

sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • September 17, 2020

@DanJ_LRSFC Did you create the package in Composer on your Mac? If not you can use the Convert to Source button in Composer. Just find the files you want to replace in the Composer window for the package and drag the new files into the appropriate spots in the package structure. They don't have to be in the actual locations on your Mac. Just be sure to reset the permissions after you drag the new files into Composer.


donmontalvo
Forum|alt.badge.img+36
  • Legendary Contributor
  • September 18, 2020

Expanding and flattening would strip the signing cert, if the original was signed. If Computer is set up to sign, should be fine. If signing matters in your shop.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings