EGA-archive / LocalEGA

A federated storage for sensitive data
http://localega.readthedocs.io
Apache License 2.0
7 stars 16 forks source link

problem during installation #138

Open gl00ten opened 4 months ago

gl00ten commented 4 months ago

Expected Behavior

im doing the make -j3 step from https://github.com/EGA-archive/LocalEGA/tree/master/deploy/docker

Current Behavior

getting a bunch of errors. i will post the logs below

Possible Solution

Steps to Reproduce

i think i followed the steps correctly

but, i also did a git pull of the distribution and the inbox projects into localega/LocalEGA/src

LocalEGA-distribution -> distribution LocalEGA-inbox -> inbox

I guessed this step, as it's not in the manual.

vault handler and mq remain empty directories distribution handler inbox mq vault

Context (Environment)

im inside an arch machine with docker and docker compose installed.

make -j3 images LEGA_UID=$(id -u lega) LEGA_GID=$(id -g lega)

make -C ../../src/inbox latest LEGA_GID=952
make -C ../../src/handler latest LEGA_UID=1001 LEGA_GID=952
make -C ../../src/vault latest
make[1]: Entering directory '/home/eli/cnio/localega/LocalEGA/src/handler'
make[1]: Entering directory '/home/eli/cnio/localega/LocalEGA/src/inbox'
make[1]: Entering directory '/home/eli/cnio/localega/LocalEGA/src/vault'
docker build  -t fega/vault-db:latest .
docker build  \
       --build-arg ARCH=x86_64 \
               --build-arg LEGA_GID=952 \
       -t crg/fega-inbox:37acf6c5198337aca1bc32c1b745edd9d5ab00a7 .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  58.37kB
Step 1/35 : FROM postgres:15 AS BUILD
 ---> bacb8d141d0d
Step 2/35 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> 2f1c8ef8cf2c
Step 3/35 : RUN apt-get update;     apt-get install -y --no-install-recommends      ca-certificates pkg-config git gcc make automake autoconf libtool             bzip2 zlib1g-dev libssl-dev libedit-dev libpq-dev postgresql-server-dev-15             cmake
 ---> Using cache
 ---> be2031894d8a
Step 4/35 : COPY libsodium /var/src/libsodium
 ---> Using cache
 ---> b263deda71db
Step 5/35 : WORKDIR /var/src/libsodium
 ---> Using cache
 ---> a69c641d39a3
Step 6/35 : RUN ./configure
docker build  \
       --build-arg ARCH=x86_64 \
       --build-arg COMMIT=63364770d26bdf7b55f194b825b54a6107e53ea1 \
               --build-arg BUILD_DATE="2024-05-09_18.42.35" \
               --build-arg LEGA_UID=1001 \
               --build-arg LEGA_GID=952 \
       -t fega/handler:63364770d26bdf7b55f194b825b54a6107e53ea1 .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon    2.1MB
Step 1/42 : FROM debian:12-slim AS BUILD
 ---> d5f1e9a5dd4f
Step 2/42 : RUN apt-get update &&     apt-get install -y --no-install-recommends             vim ca-certificates pkg-config git gcc cmake make automake autoconf libtool patch             bzip2 zlib1g-dev libssl-dev libedit-dev libcurl4-openssl-dev procps             libjson-c-dev libsqlite3-dev libpam0g-dev uuid-dev libreadline-dev librabbitmq-dev
 ---> Using cache
 ---> 5b2bf4ee7074
Step 3/42 : RUN groupadd -g 75 -r ega-sshd &&     mkdir -p /var/empty/sshd &&     chmod 700 /var/empty/sshd &&     useradd -c "Privilege-separated SSH"             -u 75             -g ega-sshd             -s /usr/sbin/nologin             -r             -d /var/empty/sshd ega-sshd
 ---> Using cache
 ---> f2b5c25e41f2
Step 4/42 : COPY src /var/src
 ---> Using cache
 ---> 42110b796251
Step 5/42 : WORKDIR /var/src/openssh
 ---> Using cache
 ---> f54d7de2e08c
Step 6/42 : RUN patch -p1 < ../patches/lega.patch
Sending build context to Docker daemon    172kB
Step 1/21 : FROM python:3.11-slim as BUILD
 ---> d844b89b8a09
Step 2/21 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> 8c8bf3041a9a
Step 3/21 : RUN apt-get update &&     apt-get install -y --no-install-recommends            gcc make bzip2 libpq5 libpq-dev libffi-dev libssl-dev libc-dev-bin libc-dev
 ---> Using cache
 ---> b8e8c7ad5d5d
Step 4/21 : COPY requirements.txt requirements.txt
 ---> Using cache
 ---> f3faac8c0a28
Step 5/21 : RUN pip install --upgrade pip &&     pip install -r requirements.txt
 ---> Using cache
 ---> e91f4555bf21
Step 6/21 : FROM python:3.11-slim
 ---> d844b89b8a09
Step 7/21 : LABEL maintainer "EGA System Developers"
 ---> Using cache
 ---> 570d08ff4d7c
Step 8/21 : LABEL org.label-schema.schema-version="2.0"
 ---> Using cache
 ---> 1f0563ff3d4c
Step 9/21 : LABEL org.label-schema.vcs-url="https://github.com/EGA-archive/LocalEGA"
 ---> Using cache
 ---> 0cfee4015197
Step 10/21 : COPY --from=BUILD /usr/local/lib/            /usr/local/lib/
 ---> Using cache
 ---> 8ace30be38e4
 ---> Running in 3c54321e98ae
Step 11/21 : ARG LEGA_UID=1000
 ---> Using cache
 ---> 12855b970688
Step 12/21 : ARG LEGA_GID=1000
 ---> Using cache
 ---> fb8f0a0bc695
Step 13/21 : RUN ldconfig -v                            &&     groupadd -g ${LEGA_GID} -r lega        &&     useradd -M -g lega -u ${LEGA_UID} lega &&     mkdir -p /ega/staging                  &&     mkdir -p /ega/vault                    &&     mkdir -p /ega/vault.bkp                &&     mkdir -p /etc/ega                      &&     chgrp lega /ega/staging                &&     chgrp lega /ega/vault                  &&     chgrp lega /ega/vault.bkp              &&     chgrp lega /etc/ega                    &&     chmod 2770 /ega/staging                &&     chmod 2770 /ega/vault                  &&     chmod 2770 /ega/vault.bkp              &&     chmod 2770 /etc/ega
 ---> Using cache
 ---> 67d0c3920eb2
Step 14/21 : VOLUME /ega/vault
 ---> Using cache
 ---> b902cf0602f8
Step 15/21 : VOLUME /ega/vault.bkp
 ---> Using cache
 ---> 1bc2f547e59e
Step 16/21 : VOLUME /ega/staging
 ---> Using cache
 ---> 014340afd3f4
Step 17/21 : VOLUME /etc/ega
 ---> Using cache
 ---> 33137d0cc3fe
Step 18/21 : COPY code /ega/code
 ---> Using cache
 ---> 0a8c7853048e
Step 19/21 : USER lega
 ---> Using cache
 ---> 989d46ad39cc
Step 20/21 : WORKDIR /ega
 ---> Using cache
 ---> 9a4926a2c13c
Step 21/21 : ENTRYPOINT ["python", "-m", "code"]
 ---> Using cache
 ---> 2a0c94fe4f9e
[Warning] One or more build-args [ARCH BUILD_DATE COMMIT] were not consumed
Successfully built 2a0c94fe4f9e
 ---> Running in 86cb004aee51
Successfully tagged fega/handler:63364770d26bdf7b55f194b825b54a6107e53ea1
docker tag fega/handler:63364770d26bdf7b55f194b825b54a6107e53ea1 fega/handler:latest
make[1]: Leaving directory '/home/eli/cnio/localega/LocalEGA/src/handler'
/bin/sh: 1: ./configure: not found
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uN openssh.old/Makefile.in openssh.new/Makefile.in
|--- openssh.org/Makefile.in    2023-11-15 22:10:54.165546514 +0000
|+++ openssh.new/Makefile.in    2023-11-15 21:48:48.012182777 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 25
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uN openssh.org/configure.ac openssh.new/configure.ac
|--- openssh.org/configure.ac   2023-11-15 22:10:54.169546398 +0000
|+++ openssh.new/configure.ac   2023-11-15 21:48:48.016182735 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
patching file mq-config.c
patching file mq-config.h
can't find file to patch at input line 445
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uN openssh.org/sftp-server.c openssh.new/sftp-server.c
|--- openssh.org/sftp-server.c  2023-11-15 22:10:54.225544766 +0000
|+++ openssh.new/sftp-server.c  2023-11-15 22:16:54.616229656 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
11 out of 11 hunks ignored
can't find file to patch at input line 1027
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uN openssh.org/sshd.c openssh.new/sshd.c
|--- openssh.org/sshd.c 2023-11-15 22:10:54.233544532 +0000
|+++ openssh.new/sshd.c 2023-11-15 21:48:48.020182693 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
5 out of 5 hunks ignored
The command '/bin/sh -c ./configure' returned a non-zero code: 127
make[1]: *** [Makefile:17: latest] Error 127
make[1]: Leaving directory '/home/eli/cnio/localega/LocalEGA/src/vault'
make: *** [Makefile:39: image-vault] Error 2
make: *** Waiting for unfinished jobs....
The command '/bin/sh -c patch -p1 < ../patches/lega.patch' returned a non-zero code: 1
make[1]: *** [Makefile:22: latest] Error 1
make[1]: Leaving directory '/home/eli/cnio/localega/LocalEGA/src/inbox'
make: *** [Makefile:21: image-inbox] Error 2

Without the -j3 flag, running make gets this:

make images LEGA_UID=$(id -u lega) LEGA_GID=$(id -g lega)
make -C ../../src/inbox latest LEGA_GID=952
make[1]: Entering directory '/home/eli/cnio/localega/LocalEGA/src/inbox'
docker build  \
       --build-arg ARCH=x86_64 \
               --build-arg LEGA_GID=952 \
       -t crg/fega-inbox:37acf6c5198337aca1bc32c1b745edd9d5ab00a7 .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon    2.1MB
Step 1/42 : FROM debian:12-slim AS BUILD
 ---> d5f1e9a5dd4f
Step 2/42 : RUN apt-get update &&     apt-get install -y --no-install-recommends             vim ca-certificates pkg-config git gcc cmake make automake autoconf libtool patch             bzip2 zlib1g-dev libssl-dev libedit-dev libcurl4-openssl-dev procps             libjson-c-dev libsqlite3-dev libpam0g-dev uuid-dev libreadline-dev librabbitmq-dev
 ---> Using cache
 ---> 5b2bf4ee7074
Step 3/42 : RUN groupadd -g 75 -r ega-sshd &&     mkdir -p /var/empty/sshd &&     chmod 700 /var/empty/sshd &&     useradd -c "Privilege-separated SSH"             -u 75             -g ega-sshd             -s /usr/sbin/nologin             -r             -d /var/empty/sshd ega-sshd
 ---> Using cache
 ---> f2b5c25e41f2
Step 4/42 : COPY src /var/src
 ---> Using cache
 ---> 42110b796251
Step 5/42 : WORKDIR /var/src/openssh
 ---> Using cache
 ---> f54d7de2e08c
Step 6/42 : RUN patch -p1 < ../patches/lega.patch
 ---> Running in c442a6b69eec
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uN openssh.old/Makefile.in openssh.new/Makefile.in
|--- openssh.org/Makefile.in    2023-11-15 22:10:54.165546514 +0000
|+++ openssh.new/Makefile.in    2023-11-15 21:48:48.012182777 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 25
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uN openssh.org/configure.ac openssh.new/configure.ac
|--- openssh.org/configure.ac   2023-11-15 22:10:54.169546398 +0000
|+++ openssh.new/configure.ac   2023-11-15 21:48:48.016182735 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
patching file mq-config.c
patching file mq-config.h
can't find file to patch at input line 445
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uN openssh.org/sftp-server.c openssh.new/sftp-server.c
|--- openssh.org/sftp-server.c  2023-11-15 22:10:54.225544766 +0000
|+++ openssh.new/sftp-server.c  2023-11-15 22:16:54.616229656 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
11 out of 11 hunks ignored
can't find file to patch at input line 1027
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uN openssh.org/sshd.c openssh.new/sshd.c
|--- openssh.org/sshd.c 2023-11-15 22:10:54.233544532 +0000
|+++ openssh.new/sshd.c 2023-11-15 21:48:48.020182693 +0000
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
5 out of 5 hunks ignored
The command '/bin/sh -c patch -p1 < ../patches/lega.patch' returned a non-zero code: 1
make[1]: *** [Makefile:22: latest] Error 1
make[1]: Leaving directory '/home/eli/cnio/localega/LocalEGA/src/inbox'
make: *** [Makefile:21: image-inbox] Error 2
gl00ten commented 3 months ago

Hi guys, maybe I didn't find it and it was written somewhere, but it would be very helpful if the flags to git clone were written somewhere I though it only had two submodules. git clone --recurse-submodules git://github.com/foo/bar.git

With this at least the compilation step finished. :)