Skip to content

Commit

Permalink
ubuntu 24.04 support
Browse files Browse the repository at this point in the history
- there is caveat - pylibconfig2 is a pip package,
  Ubuntu now enforces `--break-system-packages` to
  install it system-wide.

  In our case there is no system package to get
  for it, so it _should_ be safe. But.
  I don't want to go against this new rule (which
  is normally very reasonable) and therefore
  I am dropping `pylibconfig2` use for now.

  This is no disaster, it's used only by cert
  generator to reach portal name config variable
  from smithproxy config file. It's not
  utterly needed. Portal cert will be using
  hostname from system anyway.

  You can still install pylibconfig2 yourself:
  `pip install pylibconfig2 --break-system-packages`
  • Loading branch information
astibal committed Oct 23, 2024
1 parent 870d5de commit 3e8ad88
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 3 deletions.
24 changes: 24 additions & 0 deletions tools/docker/0.9/build/ubuntu24.04-dbg/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:24.04

ARG FTP_UPLOAD_PWD=""
ARG FTP_UPLOAD_USER=""
ARG FTP_UPLOAD_PATH=""
ARG HTTP_CHECK_PATH=""
ARG SX_BRANCH="master"
ARG CURL_UPLOAD_OPTS=""
ARG MAKE_DEBUG="Y"
ARG CHANNEL="snapshots"

WORKDIR /app

RUN if [ "$http_proxy" != "" ]; then echo "Acquire::http { Proxy \"${http_proxy}\"; };" >> /etc/apt/apt.conf.d/01proxy; fi;

RUN apt update && apt -y install git && DEBIAN_FRONTEND=noninteractive apt install -y tzdata

RUN echo "Getting git branch: ${SX_BRANCH}"; git clone --depth 1 --recursive https://github.com/astibal/smithproxy.git -b ${SX_BRANCH} smithproxy

RUN cd smithproxy && ./tools/linux-deps.sh

RUN cd /app/smithproxy/tools/pkg-scripts/deb && ./createdeb-0.9.sh

CMD echo "there is nothing to see - it's a build-only image"
1 change: 1 addition & 0 deletions tools/docker/0.9/build/ubuntu24.04-dbg/hooks
24 changes: 24 additions & 0 deletions tools/docker/0.9/build/ubuntu24.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:24.04

ARG FTP_UPLOAD_PWD=""
ARG FTP_UPLOAD_USER=""
ARG FTP_UPLOAD_PATH=""
ARG HTTP_CHECK_PATH=""
ARG SX_BRANCH="master"
ARG CURL_UPLOAD_OPTS=""
ARG MAKE_DEBUG=""
ARG CHANNEL="snapshots"

WORKDIR /app

RUN if [ "$http_proxy" != "" ]; then echo "Acquire::http { Proxy \"${http_proxy}\"; };" >> /etc/apt/apt.conf.d/01proxy; fi;

RUN apt update && apt -y install git && DEBIAN_FRONTEND=noninteractive apt install -y tzdata

RUN echo "Getting git branch: ${SX_BRANCH}"; git clone --depth 1 --recursive https://github.com/astibal/smithproxy.git -b ${SX_BRANCH} smithproxy

RUN cd smithproxy && ./tools/linux-deps.sh

RUN cd /app/smithproxy/tools/pkg-scripts/deb && ./createdeb-0.9.sh

CMD echo "there is nothing to see - it's a build-only image"
1 change: 1 addition & 0 deletions tools/docker/0.9/build/ubuntu24.04/hooks
17 changes: 14 additions & 3 deletions tools/linux-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ if [ "${DIST}" = "Ubuntu" ]; then
SX_GCC_VER="12"
LIBSSL="libssl3"
PIP="pip"
elif [ "${REV}" = "24.04" ]; then
SX_LIBCONFIG_VER="9v5"
SX_GCC_VER="13"
LIBSSL="libssl3"
PIP="false"
fi


Expand All @@ -112,7 +117,7 @@ if [ "${DIST}" = "Ubuntu" ]; then
echo "... installing essentials and libraries"
apt update && apt install -y \
wget curl \
python3 python3-pip python3-dev \
python3 python3-dev \
libconfig++${SX_LIBCONFIG_VER} ${LIBSSL} libunwind8 libmicrohttpd12 \
libconfig-dev libconfig++-dev libssl-dev libunwind-dev libmicrohttpd-dev libcurl4-openssl-dev libpam-dev nlohmann-json3-dev git g++-${SX_GCC_VER} cmake make

Expand All @@ -121,8 +126,14 @@ if [ "${DIST}" = "Ubuntu" ]; then
debootstrap devscripts build-essential lintian debhelper vim nano

echo "... installing python libraries"
${PIP} install --upgrade pip
${PIP} install pyparsing pylibconfig2

if [ "${PIP}" != "false" ]; then
apt install -y python3-pip
${PIP} install --upgrade pip
${PIP} install pyparsing pylibconfig2
else
echo "... PIP is not installed"
fi

elif [ "${DIST}" = "Debian" ]; then

Expand Down

0 comments on commit 3e8ad88

Please sign in to comment.