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

http2: Allow using a shared nghttp2 library #15256

Closed
wants to merge 2 commits into from
Closed

http2: Allow using a shared nghttp2 library #15256

wants to merge 2 commits into from

Conversation

jer-gentoo
Copy link

As nice as it is to bundle several libraries for builders' convenience,
it also exposes builders to several kinds of security problems (until
you release a new version with the bundled libraries updated) and it
duplicates the number of versions of a library present on systems. For
instance, with libcurl/curl installed and built against nghttp2, having
a bundled (and older) version of libnghttp2 statically linked into
/usr/bin/node duplicates the other version already present in /usr/lib*.

As nice as it is to bundle several libraries for builders' convenience,
it also exposes builders to several kinds of security problems (until
you release a new version with the bundled libraries updated) and it
duplicates the number of versions of a library present on systems. For
instance, with libcurl/curl installed and built against nghttp2, having
a bundled (and older) version of libnghttp2 statically linked into
/usr/bin/node duplicates the other version already present in /usr/lib*.
@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Sep 8, 2017
@BridgeAR
Copy link
Member

@nodejs/build PTAL

@jasnell jasnell requested a review from bnoordhuis September 13, 2017 22:48
@BridgeAR
Copy link
Member

Ping @nodejs/http2 @nodejs/build

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

It is beyond my area of expertise to know if this is correct. However, +1 we need this.

node.gyp Outdated
'dependencies': [
'deps/nghttp2/nghttp2.gyp:nghttp2'
]
}]
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary? It's covered by the conditional around line 712, right?

Copy link
Author

Choose a reason for hiding this comment

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

I didn't write the conditionals for v8_enable_inspector==1, but I assumed that the author requires all bundled libraries in that case, so requiring the bundled nghttp2 as with the other bundled libraries seemed proper.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, sorry, I mean line 254 in node.gypi.

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

@jer-gentoo Can you rebase? Thanks.

node.gyp Outdated
'dependencies': [
'deps/nghttp2/nghttp2.gyp:nghttp2'
]
}]
Copy link
Member

Choose a reason for hiding this comment

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

Ah, sorry, I mean line 254 in node.gypi.

@jer-gentoo
Copy link
Author

@bnoordhuis: Should be done now.

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

Can you rebase onto master rather than merge master into your branch? Thanks!

'defines': [
# We're using the nghttp2 static lib
'NGHTTP2_STATICLIB'
]
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove the define? That's taken care of now that #15487 has been merged.

@@ -300,7 +299,7 @@
'NODE_PLATFORM="<(OS)"',
'NODE_WANT_INTERNALS=1',
# Warn when using deprecated V8 APIs.
'V8_DEPRECATION_WARNINGS=1',
'V8_DEPRECATION_WARNINGS=1'
Copy link
Member

Choose a reason for hiding this comment

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

Can you undo this change?

@jer-gentoo
Copy link
Author

jer-gentoo commented Sep 26, 2017 via email

@BridgeAR
Copy link
Member

BridgeAR commented Sep 27, 2017

@jer-gentoo I am not sure what you mean with pushing the wrong branch but to rebase you can do something like the following (depending on your git setup).

git rebase -i upstream/master
# resolve conflicts
git push --force-with-lease

@gibfahn
Copy link
Member

gibfahn commented Sep 28, 2017

@BridgeAR changed --force to --force-with-lease, I'd suggest suggesting that to people to try to minimize the chances of PR branches being accidentally destroyed.

@bnoordhuis
Copy link
Member

Or just git push jer-gentoo +HEAD:nghttp2_shared - that only force-pushes to the branch.

@BridgeAR
Copy link
Member

BridgeAR commented Oct 1, 2017

Ping @jer-gentoo

@cjihrig
Copy link
Contributor

cjihrig commented Nov 6, 2017

Ping @jer-gentoo. Do you plan to pursue this? A very similar PR has been opened in #16788.

@refack
Copy link
Contributor

refack commented Nov 20, 2017

Superseded by #16788.
Thanks for the effort @jer-gentoo 🏆 Hope to see you contribute more in the future.

@refack refack closed this Nov 20, 2017
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants