Skip to content

Commit f5f1e14

Browse files
authored
Merge pull request #5975 from sysown/fix/rhel-v4-packages
fix(packaging): remove runtime protobuf installation
2 parents b3dd57d + d7cb73c commit f5f1e14

5 files changed

Lines changed: 6 additions & 82 deletions

File tree

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,12 @@ binaries/proxysql%:
519519
${MAKE} cleanbuild
520520
${MAKE} cleantest
521521
find . -not -path "./binaries/*" -not -path "./.git/*" | xargs touch -h --date=@${SOURCE_DATE_EPOCH}
522-
@docker compose -p "$(COMPOSE_PROJECT)" down -v --remove-orphans
523-
@docker compose -p "$(COMPOSE_PROJECT)" up $(IMG_NAME)$(IMG_TYPE)$(IMG_COMP)_build
524-
@docker compose -p "$(COMPOSE_PROJECT)" down -v --remove-orphans
522+
@set -e; \
523+
docker compose -p "$(COMPOSE_PROJECT)" down -v --remove-orphans; \
524+
trap 'docker compose -p "$(COMPOSE_PROJECT)" down -v --remove-orphans' EXIT; \
525+
docker compose -p "$(COMPOSE_PROJECT)" up --abort-on-container-exit \
526+
--exit-code-from "$(IMG_NAME)$(IMG_TYPE)$(IMG_COMP)_build" \
527+
"$(IMG_NAME)$(IMG_TYPE)$(IMG_COMP)_build"
525528

526529

527530
### clean targets

docker/images/proxysql/deb-compliant/entrypoint/entrypoint.bash

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,6 @@ else
4141
build_target="$PROXYSQL_BUILD_TYPE"
4242
fi
4343

44-
# The v4.0 chassis tier (PROXYSQL40=1) builds plugins/mysqlx/ which
45-
# dynamically links against the system libprotobuf (3.x). Some of the
46-
# v4.0.0 packaging images were built before plugins/mysqlx existed and
47-
# do not yet ship libprotobuf-dev. Install it on demand here so the
48-
# plugin's pkg-config check succeeds. The install is idempotent —
49-
# apt-get returns 0 if the package is already present. PROXYSQL40=1
50-
# builds and packages all v4.0 plugins — there is no separate
51-
# PROXYSQLGENAI flag.
52-
if [[ "${PROXYSQL40:-}" == "1" ]]; then
53-
if ! pkg-config --exists protobuf 2>/dev/null; then
54-
echo "==> Installing libprotobuf-dev (required for the mysqlx plugin build under PROXYSQL40)"
55-
apt-get update -qq
56-
apt-get install -y --no-install-recommends libprotobuf-dev
57-
fi
58-
fi
59-
6044
# clean is expensive, do it before, outside of container
6145
#${MAKE} cleanbuild
6246
#

docker/images/proxysql/rhel-compliant/entrypoint/entrypoint.bash

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,6 @@ else
4141
build_target="$PROXYSQL_BUILD_TYPE"
4242
fi
4343

44-
# The v4.0 chassis tier (PROXYSQL40=1) builds plugins/mysqlx/ which
45-
# dynamically links against the system libprotobuf (3.x). Some of the
46-
# v4.0.0 packaging images were built before plugins/mysqlx existed and
47-
# do not yet ship protobuf-devel. Install it on demand for RHEL-family
48-
# images. PROXYSQL40=1 builds and packages all v4.0 plugins — there
49-
# is no separate PROXYSQLGENAI flag.
50-
if [[ "${PROXYSQL40:-}" == "1" ]]; then
51-
if ! pkg-config --exists protobuf 2>/dev/null; then
52-
echo "==> Installing protobuf-devel (required for PROXYSQL40=1 mysqlx plugin build)"
53-
if command -v dnf >/dev/null 2>&1; then
54-
dnf install -y protobuf-devel
55-
elif command -v yum >/dev/null 2>&1; then
56-
yum install -y protobuf-devel
57-
else
58-
echo "ERROR: cannot install protobuf-devel (neither dnf nor yum present)" >&2
59-
exit 1
60-
fi
61-
fi
62-
fi
63-
6444
# clean is expensive, do it before, outside of container
6545
#${MAKE} cleanbuild
6646
# PROXYSQL40=1 enables the plugin chassis tier; all v4.0 plugins

docker/images/proxysql/suse-compliant/entrypoint/entrypoint.bash

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,6 @@ else
4141
build_target="$PROXYSQL_BUILD_TYPE"
4242
fi
4343

44-
# The v4.0 chassis tier (PROXYSQL40=1) builds plugins/mysqlx/ which
45-
# dynamically links against the system libprotobuf (3.x). Some of the
46-
# v4.0.0 packaging images were built before plugins/mysqlx existed and
47-
# do not yet ship protobuf-devel. Install it on demand for SUSE-family
48-
# images. PROXYSQL40=1 builds and packages all v4.0 plugins — there
49-
# is no separate PROXYSQLGENAI flag.
50-
if [[ "${PROXYSQL40:-}" == "1" ]]; then
51-
if ! pkg-config --exists protobuf 2>/dev/null && ! pkg-config --exists libprotobuf-c 2>/dev/null; then
52-
echo "==> Installing protobuf-devel (required for PROXYSQL40=1 mysqlx plugin build)"
53-
if command -v zypper >/dev/null 2>&1; then
54-
zypper install -y libprotobuf-c-devel || zypper install -y protobuf-devel
55-
else
56-
echo "ERROR: cannot install protobuf-devel (zypper not present)" >&2
57-
exit 1
58-
fi
59-
fi
60-
fi
61-
6244
# clean is expensive, do it before, outside of container
6345
#${MAKE} cleanbuild
6446
# PROXYSQL40=1 enables the plugin chassis tier; all v4.0 plugins

docker/images/proxysql/tarball-compliant/entrypoint/entrypoint.bash

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,6 @@ EXTRA=""
2929
[[ "${PROXYSQL40:-}" == "1" ]] && EXTRA="${EXTRA} PROXYSQL40=1"
3030
[[ "${PROXYSQL31:-}" == "1" ]] && EXTRA="${EXTRA} PROXYSQL31=1"
3131

32-
# The v4.0 chassis tier builds plugins/mysqlx/ which dynamically links the
33-
# system libprotobuf (3.x). Some v4.0.0 packaging images predate the plugin
34-
# and do not ship protobuf-devel; install it on demand for RHEL-family.
35-
# protobuf-devel lives in the CRB repo on AlmaLinux/RHEL 9 (PowerTools on
36-
# EL8), which is disabled by default, so try enabling those before a plain
37-
# install.
38-
if [[ "${PROXYSQL40:-}" == "1" ]] && ! pkg-config --exists protobuf 2>/dev/null; then
39-
echo "==> Installing protobuf-devel (required for PROXYSQL40=1 mysqlx plugin build)"
40-
if command -v dnf >/dev/null 2>&1; then
41-
dnf install -y --enablerepo=crb protobuf-devel \
42-
|| dnf install -y --enablerepo=powertools protobuf-devel \
43-
|| dnf install -y protobuf-devel
44-
elif command -v yum >/dev/null 2>&1; then
45-
yum install -y --enablerepo=powertools protobuf-devel \
46-
|| yum install -y protobuf-devel
47-
else
48-
echo "ERROR: cannot install protobuf-devel (neither dnf nor yum present)" >&2
49-
exit 1
50-
fi
51-
if ! pkg-config --exists protobuf 2>/dev/null; then
52-
echo "ERROR: protobuf-devel install did not provide a usable protobuf pkg-config" >&2
53-
exit 1
54-
fi
55-
fi
56-
5732
deps_target="build_deps_clickhouse"
5833
build_target="clickhouse"
5934

0 commit comments

Comments
 (0)