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

[WIP] build: use productbuild to build .pkg files #7097

Closed
wants to merge 1 commit into from

Conversation

evanlucas
Copy link
Contributor

Checklist
  • the commit message follows commit guidelines
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

@nodejs-github-bot nodejs-github-bot added the meta Issues and PRs related to the general management of the project. label Jun 1, 2016
#!/bin/bash

[[ -d /usr/local/lib/node_modules/npm ]] \
&& rm -rf /usr/local/lib/node_modules/npm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yessss!!!!

@MylesBorins
Copy link
Contributor

awesome! +1

Let me know if there is anything I can do to help

@mscdex mscdex added build Issues and PRs related to build files or the CI. macos Issues and PRs related to the macOS platform / OSX. and removed meta Issues and PRs related to the general management of the project. labels Jun 1, 2016
@rvagg
Copy link
Member

rvagg commented Jun 2, 2016

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?

@evanlucas
Copy link
Contributor Author

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.

@rvagg
Copy link
Member

rvagg commented Jun 2, 2016

+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.

@evanlucas
Copy link
Contributor Author

So digging more into this, there are some cases where I can't seem to make the preinstall script for npm work properly. If /usr/local is owned by root, the preinstall script fails. I'll keep trying to figure out what is going on

@rvagg
Copy link
Member

rvagg commented Jun 3, 2016

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?

@MylesBorins
Copy link
Contributor

fwiw I had some serious issue getting the rm -rf /usr/local/lib/node_modules/npm to work as a pre script with the current installer while I was toying around with it.

@evanlucas
Copy link
Contributor Author

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

@evanlucas
Copy link
Contributor Author

Still haven't been able to get this working properly. Closing for now

@evanlucas evanlucas closed this Jun 8, 2016
@rvagg
Copy link
Member

rvagg commented Jun 8, 2016

aw, don't give up so easily!

@MylesBorins
Copy link
Contributor

@evanlucas what exactly were the problems you ran into? Was it running the first script as root?

@evanlucas
Copy link
Contributor Author

the preinstall script would fail if /usr/local is not owned by the user installing it

jpwesselink added a commit to jpwesselink/node that referenced this pull request Sep 15, 2017
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
BridgeAR pushed a commit that referenced this pull request Sep 28, 2017
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>
MylesBorins pushed a commit that referenced this pull request Sep 29, 2017
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>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 30, 2017
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>
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
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>
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
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>
MylesBorins pushed a commit that referenced this pull request Jan 16, 2018
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>
MylesBorins pushed a commit that referenced this pull request Jan 17, 2018
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>
MylesBorins pushed a commit that referenced this pull request Feb 11, 2018
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>
MylesBorins pushed a commit that referenced this pull request Feb 12, 2018
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>
MylesBorins pushed a commit that referenced this pull request Feb 13, 2018
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. macos Issues and PRs related to the macOS platform / OSX.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants