]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-new-build: cross-compile Windows targets using pbuilder 1755/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 2 Mar 2021 08:44:19 +0000 (10:44 +0200)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 2 Mar 2021 13:56:10 +0000 (15:56 +0200)
The Windows builds that are generated right now are unusable due to
known Mingw runtime bugs.

We need Ubuntu Focal or later, for which reason we're going to use
pbuilder.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
ceph-dev-new-build/build/build_mingw
ceph-dev-new-build/build/setup_mingw
ceph-dev-new-build/build/validate_mingw

index 4741e9854ce4269a0ca0a1e67388bb3bc87c4c79..23b968032fb02a008b4c08ee92366468ec717a61 100644 (file)
@@ -1,7 +1,26 @@
 #!/bin/bash
 set -ex
 
+# We need Ubuntu Focal to cross-compile Ceph for Windows.
+# Previous versions provide broken Mingw packages.
+# "DIST" will be set to "windows", so we're currently overriding it with
+# a hardcoded value.
+tmp_pbuild_script=$(mktemp /tmp/build_mingw_pbuild.XXXXXX)
+cat << EOF > $tmp_pbuild_script
+#!/bin/sh
+# Used by the build script
+apt-get install -y sudo git automake wget
+
+cd /mnt/ceph
 CMAKE_BUILD_TYPE=Release BUILD_ZIP=1 CLEAN_BUILD=1 timeout 3h ./win32_build.sh
+EOF
+chmod a+x $tmp_pbuild_script
+sudo pbuilder execute \
+    --bindmounts "$(pwd):/mnt/ceph" \
+    --distribution "focal" \
+    --basetgz $basedir/focal.tgz \
+    -- $tmp_pbuild_script
+rm $tmp_pbuild_script
 
 if [ "$THROWAWAY" = false ]; then
     # push binaries to chacra
index aa0e221df1c4bb9c7f875fc9b638b3bd6ebc149e..307c3ed69b81cf28e2f330cd25c6e9675fa4b5ed 100644 (file)
@@ -65,3 +65,11 @@ if [ "$THROWAWAY" = false ] ; then
     # TODO if this exits we need to post to shaman a success
     check_binary_existence $chacra_check_url
 fi
+
+# We need Ubuntu Focal to cross-compile Ceph for Windows.
+# Previous versions provide broken Mingw packages.
+# "DIST" will be set to "windows", so we're currently overriding it with
+# a hardcoded value.
+DIST="focal"
+setup_pbuilder use_gcc
+DIST="$NORMAL_DISTRO"
index d9414d2527ca8dc220156a2f9229ea16ee8c209e..c6174dfb2ab683272ee5f3137132b4595b49d267 100644 (file)
@@ -1,13 +1,9 @@
 #!/bin/bash
 set -ex
 
-# At the moment, we only support cross compiling Windows binaries using
-# Ubuntu or SUSE distros.
+# We're currently using pbuilder.
 ( source /etc/os-release
   case $ID in
-    opensuse*|suse|sles)
-      exit 0
-      ;;
     ubuntu)
       exit 0
       ;;