Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osxpkg: Unable to use generated package in newer versions of MacOS #1908

Closed
mcataga opened this issue Jun 3, 2022 · 6 comments · Fixed by #1909
Closed

osxpkg: Unable to use generated package in newer versions of MacOS #1908

mcataga opened this issue Jun 3, 2022 · 6 comments · Fixed by #1909

Comments

@mcataga
Copy link

mcataga commented Jun 3, 2022

Since fpm is using pkgbuild under the hood, could we add a parameter that passes the value to the '--install-location' parameter of pkgbuild?

Without the ability to specify that parameter, the installation location defaults to the root. Which in Mac OS Catalina and above is defaulted to read-only, so the package created ends up unusable.

@jordansissel
Copy link
Owner

Yes!

I think we can reuse an existing parameter that fpm has, --prefix. Other package types like RPM use this for controlling a similar feature.

I looked at the code in fpm, and adding support for this should be fairly simple, using passing --install-location with the argument attributes[:prefix] should do it.

I'll work on this when I can :)

jordansissel added a commit that referenced this issue Jun 4, 2022
A user reported that on macOS Catalina, the default pkgbuild install
location may result in a .pkg file which cannot be installed.

This change makes fpm's `--prefix` option pass through to `pkgbuild`'s
`--install-location` flag

> With macOS Catalina, you can no longer store files or data in the read-only system volume, nor can you write to the "root" directory ( / ) from the command line, such as with Terminal.

References:
* macOS Catalina's new read-only root filesystem: https://support.apple.com/en-us/HT210650

Fixes #1908
@jordansissel
Copy link
Owner

#1909 might fix this. I don't have access to macOS Catalina at this time, so I would love if you could help test this. If you don't know how to test it, but still want to try, let me know and maybe we can step through things together? No pressure :)

@jordansissel
Copy link
Owner

I faked my own pkgbuild on Linux just to make it so I could see if the flags given to pkgbuild were correct, and you can review that here, instead of testing directly, if that helps: #1909 (comment)

@mcataga
Copy link
Author

mcataga commented Jun 6, 2022

Hey Jordan, I was able to test the package and I'm able to install it now with the --prefix flag. Appreciate your help!

@jordansissel
Copy link
Owner

jordansissel commented Jun 7, 2022 via email

jordansissel added a commit that referenced this issue Nov 10, 2022
A user reported that on macOS Catalina, the default pkgbuild install
location may result in a .pkg file which cannot be installed.

This change makes fpm's `--prefix` option pass through to `pkgbuild`'s
`--install-location` flag

> With macOS Catalina, you can no longer store files or data in the read-only system volume, nor can you write to the "root" directory ( / ) from the command line, such as with Terminal.

References:
* macOS Catalina's new read-only root filesystem: https://support.apple.com/en-us/HT210650

Fixes #1908
jordansissel added a commit that referenced this issue Nov 10, 2022
A user reported that on macOS Catalina, the default pkgbuild install
location may result in a .pkg file which cannot be installed.

This change makes fpm's `--prefix` option pass through to `pkgbuild`'s
`--install-location` flag

> With macOS Catalina, you can no longer store files or data in the read-only system volume, nor can you write to the "root" directory ( / ) from the command line, such as with Terminal.

References:
* macOS Catalina's new read-only root filesystem: https://support.apple.com/en-us/HT210650

Fixes #1908
@jordansissel
Copy link
Owner

fpm 1.15.0 is released and contains this improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants