aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2021-12-20 22:06:26 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-12-25 03:16:57 +0900
commit3bab2ef31e4bcf0dababa562cca8ad335236c5f4 (patch)
tree1500abfab04011d37ef958d9c566bf6c4a8ca94f
parent21d611f3f44b031496e01601e74da28c8bbb14fe (diff)
downloadruby-openssl-3bab2ef31e4bcf0dababa562cca8ad335236c5f4.tar.gz
remove docker-compose files
We migrated to GitHub Actions for CI and they are no longer actively maintained. CONTRIBUTING.md is also updated to reflect the change.
-rw-r--r--CONTRIBUTING.md76
-rw-r--r--Dockerfile1
-rw-r--r--docker-compose.yml12
-rw-r--r--tool/ruby-openssl-docker/Dockerfile71
-rw-r--r--tool/ruby-openssl-docker/README.md6
-rwxr-xr-xtool/ruby-openssl-docker/init.sh20
6 files changed, 32 insertions, 154 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9f246bbc..07825163 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,16 +12,17 @@ If you think you found a bug, file a ticket on GitHub. Please DO NOT report
security issues here, there is a separate procedure which is described on
["Security at ruby-lang.org"](https://www.ruby-lang.org/en/security/).
-When reporting a bug, please make sure you include:
-* Ruby version
-* OpenSSL gem version
-* OpenSSL library version
+When reporting a bug, please make sure you include:
+
+* Ruby version (`ruby -v`)
+* `openssl` gem version (`gem list openssl` and `OpenSSL::VERSION`)
+* OpenSSL library version (`OpenSSL::OPENSSL_VERSION`)
* A sample file that illustrates the problem or link to the repository or
gem that is associated with the bug.
There are a number of unresolved issues and feature requests for openssl that
need review. Before submitting a new ticket, it is recommended to check
-[known issues] and [bugs.ruby-lang.org], the previous issue tracker.
+[known issues].
## Submitting patches
@@ -34,62 +35,50 @@ Make sure that your branch does:
* Have good commit messages
* Follow Ruby's coding style ([DeveloperHowTo])
* Pass the test suite successfully (see "Testing")
-* Add an entry to [History.md] if necessary
## Testing
We have a test suite!
Test cases are located under the
-[`test/`](https://github.com/ruby/openssl/tree/master/test) directory.
+[`test/openssl`](https://github.com/ruby/openssl/tree/master/test/openssl)
+directory.
You can run it with the following three commands:
```
-$ rake install_dependencies # installs rake-compiler, test-unit, ...
-$ rake compile
-$ rake test
+$ bundle install # installs rake-compiler, test-unit, ...
+$ bundle exec rake compile
+$ bundle exec rake test
```
-### Docker
-
-You can also use Docker Compose to run tests. It can be used to check that your
-changes work correctly with various supported versions of Ruby and OpenSSL.
-
-First, you need to install [Docker](https://www.docker.com/products/docker) and
-[Docker Compose](https://www.docker.com/products/docker-compose) on your
-computer.
+### With different versions of OpenSSL
-If you're on MacOS or Windows, we recommended to use the official [Docker
-Toolbox](https://www.docker.com/products/docker-toolbox). On Linux, follow the
-instructions for your package manager. For further information, please check
-the [official documentation](https://docs.docker.com/).
+Ruby OpenSSL supports various versions of OpenSSL library. The test suite needs
+to pass on all supported combinations.
-Once you have Docker and Docker Compose, running the following commands will
-build the container and execute the openssl tests. In this example, we will use
-Ruby version 2.3 with OpenSSL version 1.0.2.
+Similarly to when installing `openssl` gem via the `gem` command,
+you can pass a `--with-openssl-dir` argument to `rake compile`
+to specify the OpenSSL library to build against.
```
-$ docker-compose build
-$ export RUBY_VERSION=ruby-2.3
-$ export OPENSSL_VERSION=openssl-1.0.2
-$ docker-compose run test
-
-# You may want an interactive shell for dubugging
-$ docker-compose run debug
+$ ( curl -OL https://ftp.openssl.org/source/openssl-3.0.1.tar.gz &&
+ tar xf openssl-3.0.1.tar.gz &&
+ cd openssl-3.0.1 &&
+ ./config --prefix=$HOME/.openssl/openssl-3.0.1 --libdir=lib &&
+ make -j4 &&
+ make install )
+
+$ # in Ruby/OpenSSL's source directory
+$ bundle exec rake clean
+$ bundle exec rake compile -- --with-openssl-dir=$HOME/.openssl/openssl-3.0.1
+$ bundle exec rake test
```
-All possible values for `RUBY_VERSION` and `OPENSSL_VERSION` can be found in
-[`test.yml`](https://github.com/ruby/openssl/tree/master/.github/workflows/test.yml).
-
-**NOTE**: these commands must be run from the openssl repository root, in order
-to use the
-[`docker-compose.yml`](https://github.com/ruby/openssl/blob/master/docker-compose.yml)
-file we have provided.
-
-This Docker image is built using the
-[Dockerfile](https://github.com/ruby/openssl/tree/master/tool/ruby-openssl-docker)
-provided in the repository.
+The GitHub Actions workflow file
+[`test.yml`](https://github.com/ruby/openssl/tree/master/.github/workflows/test.yml)
+contains useful information for building OpenSSL/LibreSSL and testing against
+them.
## Relation with Ruby source tree
@@ -124,7 +113,6 @@ _Thanks for your contributions!_
[GitHub]: https://github.com/ruby/openssl
[known issues]: https://github.com/ruby/openssl/issues
-[bugs.ruby-lang.org]: https://bugs.ruby-lang.org/issues?utf8=%E2%9C%93&set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=o&f%5B%5D=assigned_to_id&op%5Bassigned_to_id%5D=%3D&v%5Bassigned_to_id%5D%5B%5D=7150&f%5B%5D=&c%5B%5D=project&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=updated_on&group_by=&t%5B%5D=
[DeveloperHowTo]: https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto
[HackerOne]: https://hackerone.com/ruby
[Security]: https://www.ruby-lang.org/en/security/
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index fbf4acec..00000000
--- a/Dockerfile
+++ /dev/null
@@ -1 +0,0 @@
-FROM zzak/ruby-openssl-docker:testing
diff --git a/docker-compose.yml b/docker-compose.yml
deleted file mode 100644
index da21bbee..00000000
--- a/docker-compose.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-compile: &defaults
- build: .
- environment:
- RUBY_VERSION:
- OPENSSL_VERSION:
- command: rake compile
-test:
- <<: *defaults
- command: rake compile test OSSL_MDEBUG=1 -- --enable-debug
-debug:
- <<: *defaults
- command: /bin/bash
diff --git a/tool/ruby-openssl-docker/Dockerfile b/tool/ruby-openssl-docker/Dockerfile
deleted file mode 100644
index e69bf2fc..00000000
--- a/tool/ruby-openssl-docker/Dockerfile
+++ /dev/null
@@ -1,71 +0,0 @@
-FROM ubuntu:18.04
-
-# Supported OpenSSL versions: 1.0.1-
-ENV OPENSSL10_VERSIONS 1.0.0t 1.0.1u 1.0.2p
-ENV OPENSSL11_VERSIONS 1.1.0i 1.1.1
-# Supported libressl versions: 2.3-
-ENV LIBRESSL_VERSIONS 2.3.10 2.4.5 2.5.5 2.6.5 2.7.4
-# Supported Ruby versions: 2.3-
-ENV RUBY_VERSIONS 2.3.7 2.4.4 2.5.1
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
- autoconf \
- bison \
- build-essential \
- ca-certificates \
- curl \
- gzip \
- libreadline-dev \
- patch \
- pkg-config \
- sed \
- zlib1g-dev
-
-RUN mkdir -p /build/openssl
-RUN for version in ${OPENSSL10_VERSIONS}; do \
- version_dir=$(echo "${version}" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') && \
- curl -s https://www.openssl.org/source/openssl-${version}.tar.gz | tar -C /build/openssl -xzf - && \
- cd /build/openssl/openssl-${version} && \
- ./Configure \
- --openssldir=/opt/openssl/openssl-${version_dir} \
- shared linux-x86_64 && \
- make && make install_sw; \
- done
-
-RUN for version in ${OPENSSL11_VERSIONS}; do \
- version_dir=$(echo "${version}" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') && \
- curl -s https://www.openssl.org/source/openssl-${version}.tar.gz | tar -C /build/openssl -xzf - && \
- cd /build/openssl/openssl-${version} && \
- ./Configure \
- --prefix=/opt/openssl/openssl-${version_dir} \
- enable-crypto-mdebug enable-crypto-mdebug-backtrace \
- linux-x86_64 && \
- make && make install_sw; \
- done
-
-RUN for version in ${LIBRESSL_VERSIONS}; do \
- version_dir=$(echo "${version}" | sed -E 's/^([0-9]+\.[0-9]+).*$/\1/') && \
- curl -s http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${version}.tar.gz | tar -C /build/openssl -xzf - && \
- cd /build/openssl/libressl-${version} && \
- ./configure \
- --prefix=/opt/openssl/libressl-${version_dir} && \
- make && make install; \
- done
-
-RUN mkdir -p /build/ruby
-RUN for version in ${RUBY_VERSIONS}; do \
- version_dir=$(echo "${version}" | sed -E 's/^([0-9]+\.[0-9]+).*$/\1/') && \
- curl -s https://cache.ruby-lang.org/pub/ruby/${version_dir}/ruby-${version}.tar.gz | tar -C /build/ruby -xzf - && \
- cd /build/ruby/ruby-${version} && \
- autoconf && ./configure \
- --without-openssl \
- --prefix=/opt/ruby/ruby-${version_dir} \
- --disable-install-doc && \
- make && make install; \
- done
-
-ONBUILD ADD . /home/openssl/code
-ONBUILD WORKDIR /home/openssl/code
-
-COPY init.sh /home/openssl/init.sh
-ENTRYPOINT ["/home/openssl/init.sh"]
diff --git a/tool/ruby-openssl-docker/README.md b/tool/ruby-openssl-docker/README.md
deleted file mode 100644
index 93c75ed3..00000000
--- a/tool/ruby-openssl-docker/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# ruby-openssl-docker
-
-Docker image for testing. The image contains various binaries of supported
-versions of OpenSSL, LibreSSL, and Ruby.
-
-CONTRIBUTING.md on the top directory describes how to use the image.
diff --git a/tool/ruby-openssl-docker/init.sh b/tool/ruby-openssl-docker/init.sh
deleted file mode 100755
index a6bc6607..00000000
--- a/tool/ruby-openssl-docker/init.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-if [[ "$RUBY_VERSION" = "" ]]
-then
- RUBY_VERSION=ruby-2.5
-fi
-
-if [[ "$OPENSSL_VERSION" = "" ]]
-then
- OPENSSL_VERSION=openssl-1.1.0
-fi
-
-echo "Using Ruby ${RUBY_VERSION} with OpenSSL ${OPENSSL_VERSION}."
-export PATH="/opt/ruby/${RUBY_VERSION}/bin:$PATH"
-export LD_LIBRARY_PATH="/opt/openssl/${OPENSSL_VERSION}/lib"
-export PKG_CONFIG_PATH="/opt/openssl/${OPENSSL_VERSION}/lib/pkgconfig"
-
-rake install_dependencies USE_HTTP_RUBYGEMS_ORG=1
-
-exec $*