Skip to content

Commit 28dc54b

Browse files
sam-githubBridgeAR
authored andcommitted
deps: update OpenSSL upgrade process
Particularly, ensure that the commit messages are self-explanatory so that reviewers can understand that the large commits are the result of a simple repeatable process. This should make them easier to review. See: nodejs#26327 (comment) PR-URL: nodejs#26378 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 5895726 commit 28dc54b

File tree

1 file changed

+49
-23
lines changed

1 file changed

+49
-23
lines changed

deps/openssl/config/README.md

+49-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Upgrading OpenSSL-1.1.0
1+
## Upgrading OpenSSL
22

33
### Requirements
44
- Linux environment (Only CentOS7.1 and Ubuntu16 are tested)
@@ -22,12 +22,12 @@ Copyright (C) 2015 Free Software Foundation, Inc.
2222
$ nasm -v
2323
NASM version 2.11.08
2424
```
25+
2526
### 1. Obtain and extract new OpenSSL sources
2627

2728
Get a new source from https://www.openssl.org/source/ and extract
2829
all files into `deps/openssl/openssl`. Then add all files and commit
2930
them.
30-
3131
```sh
3232
$ cd deps/openssl/
3333
$ rm -rf openssl
@@ -36,36 +36,58 @@ $ mv openssl-1.1.0h openssl
3636
$ git add --all openssl
3737
$ git commit openssl
3838
````
39-
The commit message can be
4039

40+
The commit message can be (with the openssl version set to the relevant value):
4141
```
4242
deps: upgrade openssl sources to 1.1.0h
4343

44-
This updates all sources in deps/openssl/openssl with openssl-1.1.0h.
44+
This updates all sources in deps/openssl/openssl by:
45+
$ cd deps/openssl/
46+
$ rm -rf openssl
47+
$ tar zxf ~/tmp/openssl-1.1.0h.tar.gz
48+
$ mv openssl-1.1.0h openssl
49+
$ git add --all openssl
50+
$ git commit openssl
4551
```
52+
4653
### 2. Apply a floating patch
4754
48-
Currently, one floating patch is needed to build S390 asm files.
55+
Currently, one floating patch is needed to build S390 asm files:
4956
```
50-
commit 094465362758ebf967b33c84d5c96230b46a34b3
51-
Author: Shigeki Ohtsu <[email protected]>
52-
Date: Wed Mar 7 23:52:52 2018 +0900
57+
Author: Shigeki Ohtsu <[email protected]>
58+
Date: Wed Mar 7 23:52:52 2018 +0900
59+
60+
deps: add s390 asm rules for OpenSSL-1.1.0
5361

54-
deps: add s390 asm rules for OpenSSL-1.1.0
62+
This is a floating patch against OpenSSL-1.1.0 to generate asm files
63+
with Makefile rules and it is to be submitted to the upstream.
5564

56-
This is a floating patch against OpenSSL-1.1.0 to generate asm files
57-
with Makefile rules and it is to be submitted to the upstream.
65+
Fixes: https://github.com/nodejs/node/issues/4270
66+
PR-URL: https://github.com/nodejs/node/pull/19794
67+
Reviewed-By: James M Snell <[email protected]>
68+
Reviewed-By: Rod Vagg <[email protected]>
69+
Reviewed-By: Michael Dawson <[email protected]>
70+
71+
deps/openssl/openssl/crypto/poly1305/build.info | 2 ++
5872
```
5973
60-
Cherry pick it from the previous commit.
74+
Find the SHA of the previous commit of this patch:
75+
```sh
76+
$ git log -n1 --oneline -- deps/openssl/openssl/crypto/poly1305/build.info
77+
```
78+
79+
Using the SHA found in the previous step, cherry pick it from the previous
80+
commit (with the openssl version in the commit message set to the relevant
81+
value):
6182
```sh
6283
$ git cherry-pick 45b9f5df6ff1548f01ed646ebee75e3f0873cefd
6384
```
64-
### 3. Execute `make` in `deps/openssl/config` directory
6585

66-
Just type `make` then it generates all platform dependent files into
67-
`deps/openssl/config/archs` directory.
6886

87+
### 3. Execute `make` in `deps/openssl/config` directory
88+
89+
Use `make` to regenerate all platform dependent files in
90+
`deps/openssl/config/archs/`:
6991
```sh
7092
$ cd deps/openssl/config; make
7193
```
@@ -99,15 +121,19 @@ $ git add deps/openssl/openssl/include/openssl/opensslconf.h
99121
$ git commit
100122
```
101123

102-
The commit message can be
124+
The commit message can be (with the openssl version set to the relevant value):
103125
```
104-
commit 8cb1de45c60f2d520551166610115531db673518
105-
Author: Shigeki Ohtsu <[email protected]>
106-
Date: Thu Mar 29 16:46:11 2018 +0900
107-
108-
deps: update archs files for OpenSSL-1.1.0
109-
110-
`cd deps/openssl/config; make` updates all archs dependant files.
126+
deps: update archs files for OpenSSL-1.1.0
127+
128+
After an OpenSSL source update, all the config files need to be regenerated and
129+
comitted by:
130+
$ cd deps/openssl/config
131+
$ make
132+
$ git add deps/openssl/config/archs
133+
$ git add deps/openssl/openssl/crypto/include/internal/bn_conf.h
134+
$ git add deps/openssl/openssl/crypto/include/internal/dso_conf.h
135+
$ git add deps/openssl/openssl/include/openssl/opensslconf.h
136+
$ git commit
111137
```
112138

113139
Finally, build Node and run tests.

0 commit comments

Comments
 (0)