Skip to content

macOS node packages missing version attribute #15012

Description

@kaloprominat
  • Version:
  • Platform:
  • Subsystem:

macOS packages missing correct version attribute, how to verify:

[user@mymac tmp]$ xar -xf ../node-v8.4.0.pkg
[user@mymac tmp]$ grep -i -r "id" * | grep version
Distribution: <pkg-ref id="org.nodejs.node.pkg" installKBytes="63040" version="1.0" auth="Root">#local.pkg
local.pkg/PackageInfo:<pkg-info format-version="2" identifier="org.nodejs.node.pkg" version="1.0" install-location="/usr/local" relocatable="true" auth="root">
npm.pkg/PackageInfo:<pkg-info format-version="2" identifier="org.nodejs.nodejs.npm.pkg" version="1.0" install-location="/usr/local/lib/node_modules/npm" auth="root">`

or, after install:

sh-3.2# pkgutil --pkg-info org.nodejs.pkg
package-id: org.nodejs.pkg
version: 1.0
volume: /
location: usr/local
install-time: 1498667456
sh-3.2# pkgutil --pkg-info org.nodejs.node.npm.pkg
package-id: org.nodejs.node.npm.pkg
version: 1.0
volume: /
location: usr/local/lib/node_modules/npm
install-time: 1498667456`

cmon guys, even brew-pkg builds node package with correct version attribute.

Activity

  1. added
    buildIssues and PRs related to Node.js builds or CI infrastructure.
    macosIssues and PRs related to the macOS platform.
    installIssues and PRs related to installing Node.js and its installers.
    on Aug 24, 2017
  2. lance commented on Aug 24, 2017

    @lance
    Member

    I poked around a little with this and noticed that the build is doing a string substitution of {nodeversion} here:

    Ref: https://github.com/nodejs/node/blob/master/Makefile#L714-L717
    (I have no idea how to make the code inline as I have seen lately)

    I thought it might be as easy as modifying index.xml.tmpl to substitute the version on this line as well.

    But... the Makefile appears to use an old, no longer distributed Apple tool called PackageMaker.app. So I started messing around with pkgbuild. Then I thought to myself, hmmm, I wonder if there is prior art and started searching issues and pull requests.

    I found a few useful references possibly related to this, all of which have to do with refactoring the mac installer:

    #5656
    #2571
    #7097

    It appears #5656 is the only one still open. But it's been open for a while now, needs rebasing, and does not look like it's on the way to landing. What is the status of this pull request, would it possibly address this (small) issue with version metadata? Does fixing the version metadata require a complete refactoring of the Mac package build? Inquiring minds want to know!

  3. jasnell commented on Aug 24, 2017

    @jasnell
    Member

    ping @nodejs/build

    We've had a profound lack of attention paid to the mac packaging over the past couple of years. There have been a few start'n'stop efforts that haven't progressed. It would be great if someone with the appropriate expertise could jump in.

  4. lance commented on Aug 24, 2017

    @lance
    Member

    @jasnell I edited my original comment above (heavily). I would be interested in looking at this, but wonder if there is any documentation that covers the distribution process. I kind of hacked my way through make pkg locally with some required commits that will need to be reset --hard. Is there any guide to working on these bits?

  5. gibfahn commented on Aug 24, 2017

    @gibfahn
    Member

    Also a good time to mention that @nodejs/platform-macos is three people, so if anyone else would like to be added please let me know!

  6. added a commit that references this issue on Sep 15, 2017
  7. added a commit that references this issue on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to Node.js builds or CI infrastructure.installIssues and PRs related to installing Node.js and its installers.macosIssues and PRs related to the macOS platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions