diff --git a/.github/workflows/container-image-buildah.yml b/.github/workflows/container-image-buildah.yml index a846e79..b0633e8 100644 --- a/.github/workflows/container-image-buildah.yml +++ b/.github/workflows/container-image-buildah.yml @@ -121,7 +121,8 @@ jobs: podman run -d --pod-id-file=podid --name=searchd -u 14:0 "${{ steps.build-image.outputs.image-with-tag }}$1" sleep 3 podman logs searchd - podman run --pod-id-file=podid --rm --entrypoint "/bin/env" mysql:8 -- mysql -h 127.0.0.1 -P 9306 -e "SELECT * FROM account limit 1;" + podman run --pod-id-file=podid --rm --entrypoint "/bin/env" mysql:8 -- mysql -h 127.0.0.1 -P 9306 -e "INSERT INTO backend_api_core (id, name, system_name) VALUES (1 ,'garga', 'kjdshsafd');" + podman run --pod-id-file=podid --rm --entrypoint "/bin/env" mysql:8 -- mysql -h 127.0.0.1 -P 9306 -e "SELECT * FROM backend_api_core limit 1;" podman rm -f searchd } diff --git a/Containerfile b/Containerfile index b6700ce..8d19490 100644 --- a/Containerfile +++ b/Containerfile @@ -1,10 +1,10 @@ FROM quay.io/centos/centos:stream9 AS builder -ENV SEARCHD_REF=6.2.12 \ +ENV SEARCHD_REF=6.3.6 \ SEARCHD_REPO=https://github.com/manticoresoftware/manticoresearch.git \ CC=clang \ CXX=clang++ \ - BUILD_PATH=/tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues \ - BUILD_FLAGS="-DUSE_SYSLOG=0 -DWITH_GALERA=0 -DWITH_RE2=0 -DWITH_STEMMER=0 -DWITH_ICU_FORCE_STATIC=0 -DWITH_SSL=1 -DWITH_ZLIB=1 -DWITH_ODBC=0 -DWITH_EXPAT=0 -DWITH_ICONV=1 -DWITH_POSTGRESQL=0 -DWITH_MYSQL=0 -DBUILD_TESTING=0" + BUILD_PATH=/tmp/manticore_uselessly_very_long_path_to_prevent_rpm_build_issues \ + BUILD_FLAGS="-DUSE_SYSLOG=0 -DWITH_GALERA=0 -DWITH_RE2=0 -DWITH_STEMMER=0 -DWITH_ICU_FORCE_STATIC=0 -DWITH_SSL=1 -DWITH_ZLIB=1 -DWITH_ODBC=0 -DWITH_EXPAT=0 -DWITH_ICONV=1 -DWITH_POSTGRESQL=0 -DWITH_MYSQL=0 -DBUILD_TESTING=0 -DDISTR=rhel9" WORKDIR $BUILD_PATH SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"] @@ -17,7 +17,14 @@ RUN yum install -y --setopt=skip_missing_names_on_install=False,tsflags=nodocs l sed -i -e 's/Boost_USE_STATIC_LIBS ON/Boost_USE_STATIC_LIBS OFF/' src/CMakeLists.txt && \ mkdir build && cd build && \ cmake $BUILD_FLAGS .. && \ - cmake --build . --target package --config RelWithDebInfo + cmake --build . --target package --config RelWithDebInfo # Debug + +# Build the tzdata RPM +COPY --chown=adm rpmbuild/ /var/adm/rpmbuild/ +RUN chown -R adm /var/adm +WORKDIR /var/adm +USER adm +RUN rpmbuild -bb rpmbuild/SPECS/manticore-tzdata.spec FROM quay.io/centos/centos:stream9-minimal @@ -34,9 +41,10 @@ LABEL org.opencontainers.image.authors="https://issues.redhat.com/browse/THREESC # org.opencontainers.image.created="" ARG PORTA_IMAGE=quay.io/3scale/porta:nightly -COPY --from=builder /tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues/build/*.rpm /tmp/rpms/ +COPY --from=builder /tmp/manticore_uselessly_very_long_path_to_prevent_rpm_build_issues/build/*.rpm /tmp/rpms/ +COPY --from=builder /var/adm/rpmbuild/RPMS/noarch/manticore-tzdata-1.1-1.noarch.rpm /tmp/rpms/ COPY --from=$PORTA_IMAGE /opt/system/config/standalone.sphinx.conf "/etc/manticoresearch/manticore.conf" -ENV MANTICORE_RPMS="manticore-converter* manticore-common* manticore-server-core* manticore-server*" +ENV MANTICORE_RPMS="manticore-converter* manticore-common* manticore-server-core* manticore-server* manticore-tzdata-1.1-1.noarch.rpm" RUN microdnf install -y --nodocs mysql openssl boost-context boost-filesystem zlib libicu && \ cd /tmp/rpms && ls -l && \ rpm -iv --excludedocs $MANTICORE_RPMS && \ diff --git a/rpmbuild/SPECS/manticore-tzdata.spec b/rpmbuild/SPECS/manticore-tzdata.spec new file mode 100644 index 0000000..7f94ddc --- /dev/null +++ b/rpmbuild/SPECS/manticore-tzdata.spec @@ -0,0 +1,20 @@ +Name: manticore-tzdata +Release: 1 +Summary: Direct Manticore into OS tzdata + +Requires: tzdata + +BuildArch: noarch + +License: MIT +Version: 1.1 + +%description +Symlinks OS tzdata of Red Hat Enterprise Linux 9 for Manticore use. + +%install +mkdir -p %{buildroot}/usr/share/manticore +ln -s ../zoneinfo %{buildroot}/usr/share/manticore/tzdata + +%files +/usr/share/manticore/tzdata