Preset Git safe.directory property

This change ensures that Git will consider all
directories as safe within the container.

Also switched to libyaml-dev package 0.2.2 instead
of built from source 0.2.5

Change-Id: I2c161b8504ad9c401531fd3fdcb121eafa633dd7
This commit is contained in:
Sergiy Markin 2025-02-04 01:58:44 +00:00
parent 65421815e1
commit 071c3d41f1
4 changed files with 33 additions and 16 deletions

View File

@ -7,4 +7,6 @@ libpq-dev [platform:dpkg]
libsasl2-dev [platform:dpkg] libsasl2-dev [platform:dpkg]
libssl-dev [platform:dpkg] libssl-dev [platform:dpkg]
libre2-dev [platform:dpkg] libre2-dev [platform:dpkg]
libzmq3-dev [platform:dpkg] libzmq3-dev [platform:dpkg]
libyaml-dev [platform:dpkg]
golang-cfssl [platform:dpkg]

3
entrypoint.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
git config --global --add safe.directory "*"
exec "$@"

View File

@ -42,6 +42,10 @@ RUN set -ex \
python3-dev \ python3-dev \
python3-pip \ python3-pip \
python3-setuptools \ python3-setuptools \
# this will install libyaml 0.2.22 in Jammy
libyaml-dev \
# this will install golang-cfssl 1.2.0 in Jammy
golang-cfssl \
&& python3 -m pip install -U pip \ && python3 -m pip install -U pip \
&& apt autoremove -yqq --purge \ && apt autoremove -yqq --purge \
&& apt clean \ && apt clean \
@ -56,17 +60,17 @@ RUN set -ex \
ENV LD_LIBRARY_PATH=/usr/local/lib ENV LD_LIBRARY_PATH=/usr/local/lib
ARG LIBYAML_VERSION=0.2.5 # ARG LIBYAML_VERSION=0.2.5
RUN set -ex \ # RUN set -ex \
&& git clone https://github.com/yaml/libyaml.git \ # && git clone https://github.com/yaml/libyaml.git \
&& cd libyaml \ # && cd libyaml \
&& git checkout $LIBYAML_VERSION \ # && git checkout $LIBYAML_VERSION \
&& ./bootstrap \ # && ./bootstrap \
&& ./configure \ # && ./configure \
&& make \ # && make \
&& make install \ # && make install \
&& cd .. \ # && cd .. \
&& rm -fr libyaml # && rm -fr libyaml
VOLUME /var/pegleg VOLUME /var/pegleg
WORKDIR /var/pegleg WORKDIR /var/pegleg
@ -77,8 +81,14 @@ RUN pip3 install -r https://opendev.org/airship/deckhand/raw/${DECKHAND_VERSION}
&& pip3 install -r https://opendev.org/airship/shipyard/raw/${SHIPYARD_VERSION}/src/bin/shipyard_client/requirements-frozen.txt \ && pip3 install -r https://opendev.org/airship/shipyard/raw/${SHIPYARD_VERSION}/src/bin/shipyard_client/requirements-frozen.txt \
&& pip3 install --no-cache-dir -r /opt/pegleg/requirements.txt && pip3 install --no-cache-dir -r /opt/pegleg/requirements.txt
COPY tools/install-cfssl.sh /opt/pegleg/tools/install-cfssl.sh # COPY tools/install-cfssl.sh /opt/pegleg/tools/install-cfssl.sh
RUN /opt/pegleg/tools/install-cfssl.sh ${CFSSLURL} # RUN /opt/pegleg/tools/install-cfssl.sh ${CFSSLURL}
COPY . /opt/pegleg COPY . /opt/pegleg
RUN pip3 install -e /opt/pegleg --use-pep517 RUN pip3 install -e /opt/pegleg --use-pep517
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["pegleg", "--help"]

View File

@ -27,7 +27,8 @@ allowlist_externals =
find find
commands = commands =
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
bash -c "{toxinidir}/tools/install-cfssl.sh" # moved into bindep.txt
# bash -c "{toxinidir}/tools/install-cfssl.sh"
bash -c "{toxinidir}/tools/gate/run-unit-tests.sh '{posargs}'" bash -c "{toxinidir}/tools/gate/run-unit-tests.sh '{posargs}'"
@ -86,7 +87,8 @@ commands =
basepython = python3 basepython = python3
commands = commands =
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
bash -c "{toxinidir}/tools/install-cfssl.sh" # moved into bindep.txt
# bash -c "{toxinidir}/tools/install-cfssl.sh"
bash -c "{toxinidir}/tools/gate/run-cover-tests.sh '{posargs}'" bash -c "{toxinidir}/tools/gate/run-cover-tests.sh '{posargs}'"
allowlist_externals = allowlist_externals =
bash bash