Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit acf63b0

Browse filesBrowse files
evanlucasaddaleax
authored andcommitted
build,deps: add gen-openssl target
This adds a new make target to generate platform dependent files for openssl on non-linux machines. The scripts we currently have in place require linux. This adds a Dockerfile that installs the necessary dependencies to be able to generate these files. Previously, it was necessary to run `make -C deps/openssl/config` on a linux machine. Now, as long as docker is installed and in your `PATH`, it is possible to run `make gen-openssl`. PR-URL: #34642 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 222fcb1 commit acf63b0
Copy full SHA for acf63b0

File tree

Expand file treeCollapse file tree

3 files changed

+32
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+32
-0
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,3 +1400,19 @@ endif
14001400
lint-clean:
14011401
$(RM) tools/.*lintstamp
14021402
$(RM) .eslintcache
1403+
1404+
HAS_DOCKER ?= $(shell which docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
1405+
1406+
ifeq ($(HAS_DOCKER), 1)
1407+
DOCKER_COMMAND ?= docker run -it -v $(PWD):/node
1408+
IS_IN_WORKTREE = $(shell grep '^gitdir: ' $(PWD)/.git 2>/dev/null)
1409+
GIT_WORKTREE_COMMON = $(shell git rev-parse --git-common-dir)
1410+
DOCKER_COMMAND += $(if $(IS_IN_WORKTREE), -v $(GIT_WORKTREE_COMMON):$(GIT_WORKTREE_COMMON))
1411+
gen-openssl: ## Generate platform dependent openssl files (requires docker)
1412+
docker build -t node-openssl-builder deps/openssl/config/
1413+
$(DOCKER_COMMAND) node-openssl-builder make -C deps/openssl/config
1414+
else
1415+
gen-openssl:
1416+
@echo "No docker command, cannot continue"
1417+
@exit 1
1418+
endif
Collapse file

‎deps/openssl/config/Dockerfile‎

Copy file name to clipboard
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubuntu:20.04
2+
3+
VOLUME /node
4+
5+
RUN buildDeps='binutils build-essential vim nasm git' \
6+
&& apt-get update \
7+
&& apt-get install -y --no-install-recommends --force-yes $buildDeps \
8+
&& apt-get clean \
9+
&& apt-get autoremove -y \
10+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
11+
12+
WORKDIR /node
Collapse file

‎doc/guides/maintaining-openssl.md‎

Copy file name to clipboardExpand all lines: doc/guides/maintaining-openssl.md
+4Lines changed: 4 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ This updates all sources in deps/openssl/openssl by:
5858
Use `make` to regenerate all platform dependent files in
5959
`deps/openssl/config/archs/`:
6060
```console
61+
# On non-linux machines
62+
% make gen-openssl
63+
64+
# On Linux machine
6165
% make -C deps/openssl/config
6266
```
6367

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.