Skip to content

Commit

Permalink
fix: chore: Squash commits for 9.8.0 gold release
Browse files Browse the repository at this point in the history
The upstream liblzma has been suspended from github and is no longer
available.

Signed-off-by: Gordon Smith <[email protected]>
Signed-off-by: Michael Gardner <[email protected]>
  • Loading branch information
GordonSmith authored and Michael-Gardner committed Jun 17, 2024
1 parent 9c0c962 commit b2bd926
Show file tree
Hide file tree
Showing 25 changed files with 287 additions and 462 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prebuild-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags:
- "*"
branches:
- "hpcc-platform-9.6.x"
- "hpcc-platform-9.8.x"

workflow_call:
inputs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prebuild-gh_envs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
on:
push:
branches:
- "hpcc-platform-9.6.x"
- "hpcc-platform-9.8.x"

workflow_call:
inputs:
Expand Down
12 changes: 6 additions & 6 deletions dockerfiles/amazonlinux.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,30 @@ RUN ./configure --prefix=/usr/local/pkg_config/0_29_2 --with-internal-glib && \
ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
ENV ACLOCAL_PATH=$ACLOCAL_PATH:/usr/local/share/aclocal

RUN curl -o autoconf-2.71.tar.gz http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz && \
RUN curl -o autoconf-2.71.tar.gz https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz && \
gunzip autoconf-2.71.tar.gz && \
tar xvf autoconf-2.71.tar && \
cd autoconf-2.71 && \
./configure && \
make && \
make install

RUN curl -o autoconf-archive-2021.02.19.tar.xz http://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2021.02.19.tar.xz && \
RUN curl -o autoconf-archive-2021.02.19.tar.xz https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2021.02.19.tar.xz && \
xz -d -v autoconf-archive-2021.02.19.tar.xz && \
tar xvf autoconf-archive-2021.02.19.tar && \
cd autoconf-archive-2021.02.19 && \
./configure && \
make && \
make install

RUN curl -o automake-1.16.5.tar.gz http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz && \
RUN curl -o automake-1.16.5.tar.gz https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz && \
tar xvzf automake-1.16.5.tar.gz && \
cd automake-1.16.5 && \
./configure && \
make && \
make install

RUN curl -o libtool-2.4.6.tar.gz http://ftp.jaist.ac.jp/pub/GNU/libtool/libtool-2.4.6.tar.gz && \
RUN curl -o libtool-2.4.6.tar.gz https://ftp.jaist.ac.jp/pub/GNU/libtool/libtool-2.4.6.tar.gz && \
tar xvfz libtool-2.4.6.tar.gz && \
cd libtool-2.4.6 && \
./configure --prefix=/usr/local/libtool/2_4_6 && \
Expand Down Expand Up @@ -98,10 +98,10 @@ RUN ln -s /usr/local/libtool/2_4_6/bin/libtool /usr/local/bin/ && \
FROM base_build AS vcpkg_build

# Build Tools - Mono ---
RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ && \
RUN yum-config-manager --add-repo https://download.mono-project.com/repo/centos/ && \
yum clean all && \
yum makecache && \
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
yum install -y mono-complete && \
yum -y clean all && rm -rf /var/cache

Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ function doBuild() {
# doBuild ubuntu-24.04
# doBuild amazonlinux
# doBuild centos-7 &
doBuild rockylinux-8 &
doBuild centos-8 &
# doBuild rockylinux-8 &
# doBuild ubuntu-24.04 &
# doBuild ubuntu-23.04 &
# doBuild ubuntu-22.04 &
Expand Down
12 changes: 6 additions & 6 deletions dockerfiles/centos-7.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,30 @@ RUN ./configure --prefix=/usr/local/pkg_config/0_29_2 --with-internal-glib && \
ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
ENV ACLOCAL_PATH=$ACLOCAL_PATH:/usr/local/share/aclocal

RUN curl -o autoconf-2.71.tar.gz http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz && \
RUN curl -o autoconf-2.71.tar.gz https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz && \
gunzip autoconf-2.71.tar.gz && \
tar xvf autoconf-2.71.tar && \
cd autoconf-2.71 && \
./configure && \
make && \
make install

RUN curl -o autoconf-archive-2021.02.19.tar.xz http://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2021.02.19.tar.xz && \
RUN curl -o autoconf-archive-2021.02.19.tar.xz https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2021.02.19.tar.xz && \
xz -d -v autoconf-archive-2021.02.19.tar.xz && \
tar xvf autoconf-archive-2021.02.19.tar && \
cd autoconf-archive-2021.02.19 && \
./configure && \
make && \
make install

RUN curl -o automake-1.16.5.tar.gz http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz && \
RUN curl -o automake-1.16.5.tar.gz https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz && \
tar xvzf automake-1.16.5.tar.gz && \
cd automake-1.16.5 && \
./configure && \
make && \
make install

RUN curl -o libtool-2.4.6.tar.gz http://ftp.jaist.ac.jp/pub/GNU/libtool/libtool-2.4.6.tar.gz && \
RUN curl -o libtool-2.4.6.tar.gz https://ftp.jaist.ac.jp/pub/GNU/libtool/libtool-2.4.6.tar.gz && \
tar xvfz libtool-2.4.6.tar.gz && \
cd libtool-2.4.6 && \
./configure --prefix=/usr/local/libtool/2_4_6 && \
Expand Down Expand Up @@ -92,10 +92,10 @@ RUN ln -s /usr/local/libtool/2_4_6/bin/libtool /usr/local/bin/ && \
FROM base_build AS vcpkg_build

# Build Tools - Mono ---
RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ && \
RUN yum-config-manager --add-repo https://download.mono-project.com/repo/centos/ && \
yum clean all && \
yum makecache && \
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
yum install -y mono-complete && \
yum -y clean all && rm -rf /var/cache

Expand Down
9 changes: 6 additions & 3 deletions dockerfiles/centos-8.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM tgagor/centos-stream:stream8 AS base_build
FROM tgagor/centos:stream8 AS base_build

RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*.repo
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo

RUN yum update -y && yum install -y dnf-plugins-core && \
dnf config-manager --set-enabled powertools && \
Expand All @@ -25,10 +28,10 @@ SHELL ["/bin/bash", "--login", "-c"]
FROM base_build AS vcpkg_build

# Build Tools - Mono ---
RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ && \
RUN yum-config-manager --add-repo https://download.mono-project.com/repo/centos/ && \
yum clean all && \
yum makecache && \
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
dnf config-manager --add-repo https://download.mono-project.com/repo/centos8-stable.repo && \
yum install -y mono-complete && \
yum -y clean all && rm -rf /var/cache
Expand Down
5 changes: 3 additions & 2 deletions dockerfiles/rockylinux-8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN dnf install -y 'dnf-command(config-manager)' && \
libtool \
perl-IPC-Cmd \
python3 \
rpm-build \
tar \
unzip \
zip && \
Expand All @@ -28,8 +29,8 @@ FROM base_build AS vcpkg_build

# Build Tools - Mono ---
RUN dnf install -y 'dnf-command(config-manager)'
RUN rpmkeys --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
dnf config-manager --add-repo http://download.mono-project.com/repo/centos8-stable/ && \
RUN rpmkeys --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
dnf config-manager --add-repo https://download.mono-project.com/repo/centos8-stable/ && \
dnf clean all && \
dnf makecache && \
dnf install -y mono-complete
Expand Down
20 changes: 20 additions & 0 deletions overlays/liblzma/add_support_ios.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52439b3..0b5e371 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -574,6 +574,7 @@ if(HAVE_GETOPT_LONG)

install(TARGETS xzdec
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT xzdec)

if(UNIX)
@@ -701,6 +702,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)

install(TARGETS xz
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT xz)

if(UNIX)
20 changes: 20 additions & 0 deletions overlays/liblzma/build-tools.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03b8301..820d08e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -584,6 +584,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake"
COMPONENT liblzma_Development)


+if(BUILD_TOOLS)
#############################################################################
# getopt_long
#############################################################################
@@ -793,6 +794,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
endforeach()
endif()
endif()
+endif()


#############################################################################
12 changes: 12 additions & 0 deletions overlays/liblzma/fix_config_include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34c6aca00..7b3708ab2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -413,6 +413,7 @@ if(WIN32)
if(BUILD_SHARED_LIBS)
# Add the Windows resource file for liblzma.dll.
target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc)
+ target_include_directories(liblzma PRIVATE windows/vs2019)

set_target_properties(liblzma PROPERTIES
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
86 changes: 86 additions & 0 deletions overlays/liblzma/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO xz-mirror/xz
REF "v${VERSION}"
SHA512 c28461123562564e030f3f733f078bc4c840e87598d9f4b718d4bca639120d8133f969c45d7bdc62f33f081d789ec0f14a1791fb7da18515682bfe3c0c7362e0
HEAD_REF master
PATCHES
fix_config_include.patch
win_output_name.patch # Fix output name on Windows. Autotool build does not generate lib prefixed libraries on windows.
add_support_ios.patch # add install bundle info for support ios
build-tools.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools BUILD_TOOLS
)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
set(WASM_OPTIONS -DCMAKE_C_BYTE_ORDER=LITTLE_ENDIAN -DCMAKE_CXX_BYTE_ORDER=LITTLE_ENDIAN)
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
${WASM_OPTIONS}
-DBUILD_TESTING=OFF
-DCREATE_XZ_SYMLINKS=OFF
-DCREATE_LZMA_SYMLINKS=OFF
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT= # using flags from (vcpkg) toolchain
MAYBE_UNUSED_VARIABLES
CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
CREATE_XZ_SYMLINKS
CREATE_LZMA_SYMLINKS
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()

set(exec_prefix "\${prefix}")
set(libdir "\${prefix}/lib")
set(includedir "\${prefix}/include")
set(PACKAGE_URL https://tukaani.org/xz/)
set(PACKAGE_VERSION 5.4.3)
if(NOT VCPKG_TARGET_IS_WINDOWS)
set(PTHREAD_CFLAGS -pthread)
endif()
set(prefix "${CURRENT_INSTALLED_DIR}")
configure_file("${SOURCE_PATH}/src/liblzma/liblzma.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/liblzma.pc" @ONLY)
if (NOT VCPKG_BUILD_TYPE)
set(prefix "${CURRENT_INSTALLED_DIR}/debug")
configure_file("${SOURCE_PATH}/src/liblzma/liblzma.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/liblzma.pc" @ONLY)
endif()
vcpkg_fixup_pkgconfig()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/liblzma)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lzma.h" "defined(LZMA_API_STATIC)" "1")
else()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lzma.h" "defined(LZMA_API_STATIC)" "0")
endif()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share/man"
)

set(TOOLS xz xzdec)
foreach(_tool IN LISTS TOOLS)
if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
list(REMOVE_ITEM TOOLS ${_tool})
endif()
endforeach()
if(TOOLS)
vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()

file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
9 changes: 9 additions & 0 deletions overlays/liblzma/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
liblzma is compatible with built-in CMake targets:

find_package(LibLZMA REQUIRED)
target_link_libraries(main PRIVATE LibLZMA::LibLZMA)

liblzma provides CMake targets:

find_package(liblzma CONFIG REQUIRED)
target_link_libraries(main PRIVATE liblzma::liblzma)
64 changes: 64 additions & 0 deletions overlays/liblzma/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)
cmake_policy(SET CMP0057 NEW)
set(z_vcpkg_liblzma_fixup_needed 0)
if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS AND NOT CMAKE_DISABLE_FIND_PACKAGE_LibLZMA)
get_filename_component(z_vcpkg_liblzma_prefix "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
get_filename_component(z_vcpkg_liblzma_prefix "${z_vcpkg_liblzma_prefix}" DIRECTORY)
find_path(LIBLZMA_INCLUDE_DIR NAMES lzma.h PATHS "${z_vcpkg_liblzma_prefix}/include" NO_DEFAULT_PATH)
# liblzma doesn't use a debug postfix, but FindLibLZMA.cmake expects it
find_library(LIBLZMA_LIBRARY_RELEASE NAMES lzma PATHS "${z_vcpkg_liblzma_prefix}/lib" NO_DEFAULT_PATH)
find_library(LIBLZMA_LIBRARY_DEBUG NAMES lzma PATHS "${z_vcpkg_liblzma_prefix}/debug/lib" NO_DEFAULT_PATH)
unset(z_vcpkg_liblzma_prefix)
if(CMAKE_VERSION VERSION_LESS 3.16)
# Older versions of FindLibLZMA.cmake need a single lib in LIBLZMA_LIBRARY.
set(z_vcpkg_liblzma_fixup_needed 1)
set(LIBLZMA_LIBRARY "${LIBLZMA_LIBRARY_RELEASE}" CACHE INTERNAL "")
elseif(NOT TARGET LibLZMA::LibLZMA)
set(z_vcpkg_liblzma_fixup_needed 1)
endif()
# Known values, and required. Skip expensive tests.
set(LIBLZMA_HAS_AUTO_DECODER 1 CACHE INTERNAL "")
set(LIBLZMA_HAS_EASY_ENCODER 1 CACHE INTERNAL "")
set(LIBLZMA_HAS_LZMA_PRESET 1 CACHE INTERNAL "")
endif()

_find_package(${ARGS})

if(z_vcpkg_liblzma_fixup_needed)
include(SelectLibraryConfigurations)
select_library_configurations(LIBLZMA)
if(NOT TARGET LibLZMA::LibLZMA)
# Backfill LibLZMA::LibLZMA to versions of cmake before 3.14
add_library(LibLZMA::LibLZMA UNKNOWN IMPORTED)
if(DEFINED LIBLZMA_INCLUDE_DIRS)
set_target_properties(LibLZMA::LibLZMA PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBLZMA_INCLUDE_DIRS}")
endif()
set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(LibLZMA::LibLZMA PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
IMPORTED_LOCATION_RELEASE "${LIBLZMA_LIBRARY_RELEASE}")
if(EXISTS "${LIBLZMA_LIBRARY}")
set_target_properties(LibLZMA::LibLZMA PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LIBLZMA_LIBRARY}")
endif()
endif()
if(LIBLZMA_LIBRARY_DEBUG)
# Backfill debug variant to versions of cmake before 3.16
set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(LibLZMA::LibLZMA PROPERTIES IMPORTED_LOCATION_DEBUG "${LIBLZMA_LIBRARY_DEBUG}")
endif()
endif()
if(LIBLZMA_LIBRARIES AND NOT "Threads::Threads" IN_LIST LIBLZMA_LIBRARIES)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
list(APPEND LIBLZMA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
if(TARGET LibLZMA::LibLZMA)
set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)
endif()
endif()
unset(z_vcpkg_liblzma_fixup_needed)
cmake_policy(POP)
Loading

0 comments on commit b2bd926

Please sign in to comment.