]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
win32: add rhel option
authorKen Dreyer <kdreyer@redhat.com>
Fri, 9 Sep 2022 17:37:16 +0000 (17:37 +0000)
committerKen Dreyer <kdreyer@redhat.com>
Tue, 27 Sep 2022 15:21:18 +0000 (11:21 -0400)
Add an option for building the Windows client on RHEL. I've tested this
on RHEL 9.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
mingw_conf.sh
win32_build.sh
win32_deps_build.sh

index 3af7de09967fe3b2db550193eb96d66edec759b5..aa1ac941849bc5ff170c07af7736ae873938c7a4 100644 (file)
@@ -3,8 +3,8 @@
 # and directories must be determined (or defined) prior to building.
 
 # This script expects the following variables:
-# * OS - currently ubuntu or suse. In the future we may attempt to detect the
-#        platform.
+# * OS - currently ubuntu, rhel, or suse. In the future we may attempt to
+#   detect the platform.
 # * MINGW_CMAKE_FILE - if set, a cmake toolchain file will be created
 # * MINGW_POSIX_FLAGS - if set, Mingw Posix compatibility mode will be
 #                       enabled by defining the according flags.
@@ -28,6 +28,15 @@ case "$OS" in
         PTW32Include=/usr/share/mingw-w64/include
         PTW32Lib=/usr/x86_64-w64-mingw32/lib
        ;;
+    rhel)
+        mingwPosix=""
+        mingwLibDir="/usr/lib64/gcc"
+        mingwVersion="$(${MINGW_CPP}${mingwPosix} -dumpversion)"
+        mingwTargetLibDir="/usr/${MINGW_BASE}/sys-root/mingw/bin"
+        mingwLibpthreadDir="$mingwTargetLibDir"
+        PTW32Include=/usr/x86_64-w64-mingw32/sys-root/mingw/include
+        PTW32Lib=/usr/x86_64-w64-mingw32/sys-root/mingw/lib
+       ;;
     suse)
         mingwPosix=""
         mingwLibDir="/usr/lib64/gcc"
index 1f81d34ae493d19c70dd5bab26c6994a26e878d7..d6fc366e4a90fbe6c9452aa01b26e8fcf611599d 100755 (executable)
@@ -35,7 +35,7 @@ SKIP_ZIP=${SKIP_ZIP:-}
 # well as llvm rely on mspdb*.dll in order to support this proprietary format.
 EMBEDDED_DBG_SYM=${EMBEDDED_DBG_SYM:-}
 # Allow for OS specific customizations through the OS flag.
-# Valid options are currently "ubuntu" and "suse".
+# Valid options are currently "ubuntu", "suse", and "rhel".
 
 OS=${OS}
 if [[ -z $OS ]]; then
@@ -44,12 +44,16 @@ if [[ -z $OS ]]; then
     opensuse*|suse|sles)
         OS="suse"
         ;;
+    rhel|centos)
+        OS="rhel"
+        ;;
     ubuntu)
         OS="ubuntu"
         ;;
     *)
-        echo "Unsupported Linux distro $ID, only SUSE and Ubuntu are currently \
-supported. Set the OS variable to override"
+        echo "Unsupported Linux distro $ID."
+        echo "only SUSE, Ubuntu and RHEL are supported."
+        echo "Set the OS environment variable to override."
         exit 1
         ;;
     esac
index b92465cbe59efddf20f4009d427d4fff06fa9b50..fc2b026675772f7f90150d59fea81b45a0be8c60 100755 (executable)
@@ -45,7 +45,7 @@ dokanLibDir="${depsToolsetDir}/dokany/lib"
 
 # Allow for OS specific customizations through the OS flag (normally
 # passed through from win32_build).
-# Valid options are currently "ubuntu" and "suse".
+# Valid options are currently "ubuntu", "rhel", and "suse".
 OS=${OS:-"ubuntu"}
 
 function _make() {
@@ -63,6 +63,26 @@ mkdir -p $depsSrcDir
 
 echo "Installing required packages."
 case "$OS" in
+    rhel)
+        # pkgconf needs https://bugzilla.redhat.com/show_bug.cgi?id=1975416
+        sudo yum -y --setopt=skip_missing_names_on_install=False install \
+            mingw64-gcc-c++ \
+            cmake \
+            pkgconf \
+            python3-devel \
+            autoconf \
+            libtool \
+            ninja-build \
+            zip \
+            python3-Cython \
+            python3-PyYAML \
+            gcc \
+            diffutils \
+            patch \
+            wget \
+            perl \
+            git-core
+        ;;
     ubuntu)
         sudo apt-get update
         sudo env DEBIAN_FRONTEND=noninteractive apt-get -y install \