Skip to content

Commit d22932f

Browse files
committed
ci: install patched p11 from source
Patch: OpenSC/libp11#474 Rework docker setup to allow for adding files to the image. This is not possible when using " - < " and reading from STDIN because there is no Docker Build Context there which is necessary for ADD and COPY commands.
1 parent efb8dd1 commit d22932f

File tree

5 files changed

+769
-7
lines changed

5 files changed

+769
-7
lines changed

.github/actions/build-docker/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ runs:
1717
- name: "Build Docker image"
1818
shell: bash
1919
run: |
20-
docker build -t ${{ inputs.docker_tag }} - < ${{ inputs.docker_file_path }}
20+
docker build -t ${{ inputs.docker_tag }} ${{ inputs.docker_file_path }}
2121

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88

99
env:
1010
DOCKER_TAG: buildenv
11-
DOCKER_FILE_PATH: ./docker-build-env/Dockerfile
11+
DOCKER_FILE_PATH: ./dockerfiles/base
1212

1313
DOCKER_WITH_HSM_TAG: buildenv_with_hsm
14-
DOCKER_WITH_HSM_FILE_PATH: ./docker-build-env/Dockerfile-With-HSM
14+
DOCKER_WITH_HSM_FILE_PATH: ./dockerfiles/hsm-support
1515

1616
TOKEN_LABEL: token-label
1717
USER_PIN: 1234
Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,26 @@ FROM buildenv
22

33
# Install MoCOCrW dependencies (except OpenSSL)
44
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
5-
# libp11 engine
6-
libengine-pkcs11-openssl \
7-
# headers for p11 engine
8-
libp11-dev \
95
# for pkcs11-tool which we use to create keys in token
106
opensc \
117
# p11-kit-modules allows loading of libp11 engine without having to edit openssl.cnf
128
p11-kit-modules \
139
# softhsm2: includes both softhsm2-util and libsofthsm2
1410
softhsm2 \
11+
libtool
1512
&& rm -rf /var/lib/apt/lists/*
13+
14+
ADD keygen.patch /tmp/
15+
16+
RUN cd /tmp && \
17+
wget https://github.com/OpenSC/libp11/releases/download/libp11-0.4.12/libp11-0.4.12.tar.gz && \
18+
tar xvf libp11-0.4.12.tar.gz && \
19+
cd libp11-0.4.12 && \
20+
git apply /tmp/keygen.patch && \
21+
echo "Successfully patched libp11" && \
22+
autoreconf --verbose --install --force && \
23+
./configure --enable-strict && \
24+
make -j$(nproc) && \
25+
make check && \
26+
make install
27+

0 commit comments

Comments
 (0)