Dockerfile: Build and use ctags v6.1.0 (upgrade from v5.9)

Changelogs: https://github.com/universal-ctags/ctags/releases

There are some function definitions that are not found by ctags v5.9.
We must upgrade to the latest release but it isn't packaged by Debian.

We only copy the ctags executable. Debian's package files are:
https://packages.debian.org/sid/amd64/universal-ctags/filelist
We drop:
 - The optscript and readtags executables,
 - The changelog and copyright files and,
 - All manpages.
This commit is contained in:
Franciszek Stachura 2025-02-12 21:39:42 +01:00 committed by Théo Lebrun
parent 6559c597c8
commit 7d09affd5b

View file

@ -3,17 +3,22 @@ FROM debian:bookworm AS build
RUN \ RUN \
apt-get update && \ apt-get update && \
apt-get --no-install-recommends -y install \ apt-get --no-install-recommends -y install \
python3 \ git build-essential pkg-config autoconf automake \
python3-pip \ python3 python3-pip python3-dev python3-docutils \
python3-dev \
libdb-dev \ libdb-dev \
build-essential libseccomp-dev libjansson-dev libyaml-dev libxml2-dev
WORKDIR /build/ WORKDIR /build-berkeleydb/
# NOTE wheel version MUST be sycnhronized with requirements.txt # NOTE wheel version MUST be sycnhronized with requirements.txt
RUN pip wheel berkeleydb==18.1.10 RUN pip wheel berkeleydb==18.1.10
WORKDIR /build-ctags/
RUN git clone --branch v6.1.0 --depth 1 https://github.com/universal-ctags/ctags.git
WORKDIR ctags
RUN ./autogen.sh && ./configure && make -j $(nproc)
FROM debian:bookworm FROM debian:bookworm
RUN \ RUN \
@ -22,7 +27,6 @@ RUN \
python3 \ python3 \
python3-pip \ python3-pip \
python3-venv \ python3-venv \
universal-ctags \
libdb5.3 \ libdb5.3 \
perl \ perl \
git \ git \
@ -36,13 +40,15 @@ COPY ./requirements.txt /usr/local/elixir/
WORKDIR /usr/local/elixir/ WORKDIR /usr/local/elixir/
COPY --from=build /build/berkeleydb-*.whl /tmp/build/ COPY --from=build /build-berkeleydb/berkeleydb-*.whl /tmp/build/
RUN python3 -m venv venv && \ RUN python3 -m venv venv && \
. ./venv/bin/activate && \ . ./venv/bin/activate && \
pip install /tmp/build/berkeleydb-*.whl && \ pip install /tmp/build/berkeleydb-*.whl && \
pip install -r requirements.txt pip install -r requirements.txt
COPY --from=build /build-ctags/ctags/ctags /usr/bin/ctags
RUN mkdir -p /srv/elixir-data/ RUN mkdir -p /srv/elixir-data/
COPY ./docker/000-default.conf /etc/apache2/sites-available/000-default.conf COPY ./docker/000-default.conf /etc/apache2/sites-available/000-default.conf