-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
[WIP] build: use productbuild to build .pkg files #7097
Conversation
#!/bin/bash | ||
|
||
[[ -d /usr/local/lib/node_modules/npm ]] \ | ||
&& rm -rf /usr/local/lib/node_modules/npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yessss!!!!
awesome! +1 Let me know if there is anything I can do to help |
what's the WIP part of this @evanlucas? is there more to be done or can we churn out some test builds to see how it goes? |
I'm still working on various cases with this. (what happens if node is not installed, what happens if it is installed, etc) I mainly opened it to see if this was a route that anyone else would be willing to explore or not. It supports translations out of the box, which I thought was a plus as well. At this point, I have not tested it thoroughly, so I am still working through that. I also was trying to come up with a way of actually testing this as well. |
+1 for anything that makes progress, the last attempt was about (1) a newer .pkg making tool cause PackageMaker is ancient and no longer supported and (2) intl, but the last hangup was the scripting and having npm as a separate option. I was going to revisit it after having played with this recently for a separate project where I learnt quite a bit more about using Packages for this but I'm more than happy to have someone else take this bull by the horns and do what it takes. |
So digging more into this, there are some cases where I can't seem to make the preinstall script for npm work properly. If |
So does this run the .pkg as the current user? The current installer and the Packages one prompts for a password to run it all as root, or is this a general package processing concern? |
fwiw I had some serious issue getting the |
It still runs the pkg as root, but for some reason fails when trying to remove the npm directory. The problem is pretty weird considering it installs everything as root |
Still haven't been able to get this working properly. Closing for now |
aw, don't give up so easily! |
@evanlucas what exactly were the problems you ran into? Was it running the first script as root? |
the preinstall script would fail if /usr/local is not owned by the user installing it |
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm PR-URL: nodejs#15179 Fixes: nodejs#15012 Refs: nodejs#5656 Refs: nodejs#2571 Refs: nodejs#7097
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: nodejs/node#15179 Fixes: nodejs/node#15012 Refs: nodejs/node#5656 Refs: nodejs/node#2571 Refs: nodejs/node#7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Checklist
Affected core subsystem(s)
build
Description of change
Switch from using PackageMaker to productbuild/pkgbuild for building .pkg files for releases on darwin.
I just wanted to open this as a possible alternative to #2571