macos packaging using homebrew

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
User avatar
ipatch
Posts: 112
Joined: Wed Apr 08, 2020 3:40 pm
Location: dfw
Contact:

Re: macos packaging using homebrew

Post by ipatch »

i tried the `brew postinstall openssl` unfortunately that doesn't seem to resolve my issues.

i've created an apple `FreeCAD.app` bundle that you can experiment with locally if you'd like see what it is i'm talking about.


https://github.com/ipatch/homebrew-free ... 20.freecad
User avatar
chennes
Veteran
Posts: 3906
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: macos packaging using homebrew

Post by chennes »

Can you try https://github.com/FreeCAD/FreeCAD/pull/5131 ? -- I rewrote large swaths of the addon manager, and I'm hoping it gives a more verbose error message.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
ipatch
Posts: 112
Joined: Wed Apr 08, 2020 3:40 pm
Location: dfw
Contact:

Re: macos packaging using homebrew

Post by ipatch »

chennes wrote: Mon Nov 08, 2021 10:49 pm Can you try https://github.com/FreeCAD/FreeCAD/pull/5131 ? -- I rewrote large swaths of the addon manager, and I'm hoping it gives a more verbose error message.
sure, just give me a few. (a day or two).

there are a lot of hard coded paths related to the mac app bundling specifically, `/usr/local` which will fail outright in macos homebrew is installed in a directory other than `/usr/local`.
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: macos packaging using homebrew

Post by Gift »

ipatch wrote: Mon Nov 08, 2021 9:33 pm i tried the `brew postinstall openssl` unfortunately that doesn't seem to resolve my issues.

i've created an apple `FreeCAD.app` bundle that you can experiment with locally if you'd like see what it is i'm talking about.


https://github.com/ipatch/homebrew-free ... 20.freecad
Ok, I test your Image:

Code: Select all

>>> import ssl
>>> print(ssl.get_default_verify_paths())
DefaultVerifyPaths(cafile=None, capath=None, openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/Users/microbrewer/homebrew/etc/openssl@1.1/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/Users/microbrewer/homebrew/etc/openssl@1.1/certs')

With conda version:

Code: Select all

>>> import ssl
>>> print(ssl.get_default_verify_paths())
DefaultVerifyPaths(cafile='/Applications/FreeCAD_x86.app/Contents/Resources/ssl/cacert.pem', capath=None, openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/Users/runner/work/FreeCAD-Bundle/FreeCAD-Bundle/conda/osx/APP/FreeCAD.app/Contents/Resources/ssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/Users/runner/work/FreeCAD-Bundle/FreeCAD-Bundle/conda/osx/APP/FreeCAD.app/Contents/Resources/ssl/certs')
We need to included it in the app with homebrew similar conda.

edit:

Code: Select all

export SSL_CERT_FILE=${PREFIX}/ssl/cacert.pem # https://forum.freecadweb.org/viewtopic.php?f=3&t=42825
User avatar
ipatch
Posts: 112
Joined: Wed Apr 08, 2020 3:40 pm
Location: dfw
Contact:

Re: macos packaging using homebrew

Post by ipatch »

Gift wrote: Tue Nov 09, 2021 6:00 pm
ipatch wrote: Mon Nov 08, 2021 9:33 pm i tried the `brew postinstall openssl` unfortunately that doesn't seem to resolve my issues.

i've created an apple `FreeCAD.app` bundle that you can experiment with locally if you'd like see what it is i'm talking about.


https://github.com/ipatch/homebrew-free ... 20.freecad
Ok, I test your Image:

Code: Select all

>>> import ssl
>>> print(ssl.get_default_verify_paths())
DefaultVerifyPaths(cafile=None, capath=None, openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/Users/microbrewer/homebrew/etc/openssl@1.1/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/Users/microbrewer/homebrew/etc/openssl@1.1/certs')

With conda version:

Code: Select all

>>> import ssl
>>> print(ssl.get_default_verify_paths())
DefaultVerifyPaths(cafile='/Applications/FreeCAD_x86.app/Contents/Resources/ssl/cacert.pem', capath=None, openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/Users/runner/work/FreeCAD-Bundle/FreeCAD-Bundle/conda/osx/APP/FreeCAD.app/Contents/Resources/ssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/Users/runner/work/FreeCAD-Bundle/FreeCAD-Bundle/conda/osx/APP/FreeCAD.app/Contents/Resources/ssl/certs')
We need to included it in the app with homebrew similar conda.

edit:

Code: Select all

export SSL_CERT_FILE=${PREFIX}/ssl/cacert.pem # https://forum.freecadweb.org/viewtopic.php?f=3&t=42825

wow that's freaking awesome, thank you so much for looking into this. hopefully i can apply fix later today.
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: macos packaging using homebrew

Post by Gift »

ipatch wrote: Tue Nov 09, 2021 8:03 pm ...
wow that's freaking awesome, thank you so much for looking into this. hopefully i can apply fix later today.
Please see this commit for my first steps to solved it.
Post Reply