summaryrefslogtreecommitdiffstats
path: root/win32_deps_build.sh (follow)
Commit message (Collapse)AuthorAgeFilesLines
* win32_deps_build.sh: only clone the tip of required tagKefu Chai2021-07-291-8/+8
| | | | | | | no need to clone the whole repo, just clone the tip of the specified tag. this saves the bandwidth, disk IO and precious time. Signed-off-by: Kefu Chai <kchai@redhat.com>
* win32_deps_build.sh: bump snappy version to 1.1.9Kefu Chai2021-07-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | in snappy, the commit of 26102a0c66175bc39edbf484c994a21902e986dc fixes the SNAPPY_VERSION generation. and this commit was included by v1.1.8 and v1.1.9. also, in v1.1.9, a change was introduced, where the function signature was changed, and more importantly, this change is not backward compatible: < bool GetUncompressedLength(Source* source, uint32_t* result); --- > bool GetUncompressedLength(Source* source, uint32* result); see also, https://tracker.ceph.com/issues/50934 so we check SNAPPY_VERSION to tell if we should use `uint32_t` or `uint32`. in this change, snappy version used to build win32 client is bumped to the latest stable version, v1.1.9, to include the fix of SNAPPY_VERSION. this paves the road to fix of https://tracker.ceph.com/issues/50934 Signed-off-by: Kefu Chai <kchai@redhat.com>
* win32*.sh: bump boost version to 1.75Lucian Petrut2021-05-061-118/+2
| | | | | | | | | | We're updating the Windows build scripts to use Boost 1.75, the same as the Linux build. We can now drop the custom Boost patches that were needed in order to use mingw. Those have been merged upstream in the meantime. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: improve loggingLucian Petrut2021-05-061-0/+14
| | | | | | | We'll use a log file when building the Ceph dependencies. Also, we'll log some details about the operation that's about to be performed. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: fix boost urlLucian Petrut2021-05-061-1/+1
| | | | | | | The boost download location has changed, breaking the Windows build. Ths commit updates the boost download url. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* common: extract options into yamlKefu Chai2021-04-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | extract the options in common/options.cc into separate .yaml.in files, and preprocess them using CMake before translating them into .cc files using a python script. this change paves the road to render the options using sphinx, and will allow us to further annotate the options to include more metadata. also, a this YAML file can be consumed by applications like dashboard and Sphinx to consume these metadata in a simpler way. * use @variable-name@ for substituting the variables in .yaml.in file * use cmake variable of `mgr_disabled_modules` instead of C macro to define `mgr_disabled_modules` in global.yaml.in * debian/control, ceph.spec.in, win32_deps_build.sh: add python3-yaml as build dep * add y2c.py (short for YAML to C++) to translate .yaml to .cc file * common/options/*.yaml.in: extract and split options into .yaml.in files, the subvars in it is then replaced with CMake variables, and copied to the corresponding .yaml files * include/config-h.in.cmake: remove MGR_DISABLED_MODULES, as it is not a CMake variable. Signed-off-by: Kefu Chai <kchai@redhat.com>
* cephfs: Add ceph-dokan, providing Windows supportLucian Petrut2021-03-051-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to expose ceph filesystems to Windows hosts, we propose including ceph-dokan[1][2] in the Ceph tree, while updating it to work with the latest CephFS and Dokany APIs. Dokany is a well maintained project (fork of the original Dokan project), allowing filesystems to be implemented in userspace, even providing a Fuse compatibility layer. One reason for not using the FUSE compatibility layer is that it's only covering the high level API while Ceph is using the low level FUSE API, which among other things is inode centric. Changes made by this patch compared to the upstream ceph-dokan: * support latest stable Dokany API. The upstream version relies on the legacy unmaintained Dokan API * return proper error codes, converting standard errno.h values to NTSTATUS * minor changes to support latest cephfs API * drop duplicated ceph code, no longer needed if we're to include it in tree. This makes it much easier to maintain. * drop redundant permission checks, leaving it up to libcephfs * use ceph argparse helpers * use ceph logging and daemon initialization * fixed unicode handling * switched to ceph coding style * made ceph.conf param optional, using the default path if available * enabled setting file timestamps * append support * configurable timeouts set once per mount * ensure that the error code is always logged * various cleanups (removed unused entry points, checks that have been moved to dokany, simplified conditional statements, unnecessary conversions in the hot path, etc). [1] https://github.com/ketor/ceph-dokan [2] https://github.com/ceph/ceph-dokan Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* cmake,win32*.sh: Windows DLL supportLucian Petrut2021-01-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | At the moment, the Windows binaries can only be linked statically. This is less than ideal since: * the resulting binaries can be quite large, especially when including debug symbols * librados and librbd cannot be used directly by 3rd party apps * the build duration is increased In order to do a dynamic build, we'll: * add an option to win32_build.sh * fix link order * dynamically link boost * disable the "-pie" flag when using Mingw, which generates incorrect executable entry points * by default, cmake generates import libs for executables. The issue is that for rados.exe, it generates librados.dll.a, thus overriding the librados.dll import library, which breaks the build process. We'll configure cmake to skip generating import libs for executables. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: fetch WNBD dependencyLucian Petrut2020-12-091-0/+12
| | | | | | | | | | Due to a rebase mistake, we're no longer fetching WNBD, which is required by rbd-wnbd. This commit will take care of cloning WNBD and generating an import library. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: bump win32 boost dependencyLucian Petrut2020-12-091-2/+41
| | | | | | | | | | Ceph now requires boost>=1.72. We're going to update the Windows build script accordingly. There's been one Boost regression for which we have to cherry-pick a patch that hasn't been released yet. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: improve lib handlingLucian Petrut2020-12-091-4/+4
| | | | | | | | | | | When building dependencies, we assume that libs will be placed in the "lib" dir. Still, some distros might use "lib64" by default. For this reason, we'll explicitly pass the expected lib path. At the same time, we're dropping an unnecessary lib copy. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: update openssl locationLucian Petrut2020-12-091-3/+4
| | | | | | | | | | We'll fetch the openssl source code from the github repository, since the download links from the official website tend to expire quite often. At the same time, we'll drop the version from the directory name. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: cleanup dependency build dir when targetting WindowsLucian Petrut2020-12-091-0/+5
| | | | | | | | | | | | We're using a separate dir when building Ceph dependencies for Windows. The build script isn't entirely idempotent ATM, so the easiest thing to do is to just cleanup this dir when rebuilding dependencies. If *all* dependencies have been successfully built, this step is skipped by default. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* cmake,win32*.sh: Add OS=(ubuntu|suse) flag, for distro settingsMike Latimer2020-12-091-31/+34
| | | | | | | | | | | | | | | | | Distributions such as SUSE and Ubuntu differ significantly in their mingw environments. This adds an OS=(ubuntu|suse) flag, which can be used to specify which environment is being used for the build. Unless set explicitly, the scripts will try to automatically detect it. Depending on the OS selected, various mingw configuration options (binaries, library paths, etc.) as well as required packages are determined. Due to these options being configured at runtime, corresponding cmake files are generated on the fly. Signed-off-by: Mike Latimer <mlatimer@suse.com> Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
* win32*.sh: Use nproc for CPU count when targeting win32Mike Latimer2020-12-091-1/+1
| | | | | | | When building in chroot jail, /proc/cpuinfo may not be available. Switch to nproc which should be widely available, and does not rely on /proc/cpuinfo. Signed-off-by: Mike Latimer <mlatimer@suse.com>
* win32*.sh: improve win32 dependency checkMike Latimer2020-12-091-0/+2
| | | | | | | | | | | | At the moment, we assume that the dependencies have been successfully built if the "build.deps" directory exists. For convenience reasons, this change will use a file instead, signaling that we've finished building the dependencies. This will allow the build process to be resumed when interrupted. Signed-off-by: Mike Latimer <mlatimer@suse.com> Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: isolate network operations when building win32 dependenciesMike Latimer2020-12-091-12/+12
| | | | | | | | | | | We'll move network operations (git/wget/curl) under a conditional check of the source directory. This will ensure that the script is idempotent and that network operations can be avoided, using pre-existing sources if available. Signed-off-by: Mike Latimer <mlatimer@suse.com> Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: cleanup Windows build scriptLucian Petrut2020-12-091-2/+4
| | | | | | | | | | | | | | Since the switch to Python 3, a few Cmake flags are no longer required. While at it, we're dropping a few other unused Cmake flags. We're going to pass the right target os flag when building lz4 and make sure that it's included in our zip archive. win32_deps_build.sh needs a small change, fixing a sed command to become idempotent. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> Signed-off-by: Mike Latimer <mlatimer@suse.com>
* win32*.sh: fix patch commandLucian Petrut2020-12-091-4/+4
| | | | | | | There's a leftover "cat" command used when patching Boost files, which will wait for stdin. This commit fixes this issue. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* win32*.sh: update Windows build scripts and readmeLucian Petrut2020-12-091-1/+1
| | | | | | | | | | | | We're going to allow building a zip containing stripped binaries and skipping the ceph tests. We'll use a separate option rather than changing the build type so that may generate binaries containing debug symbols as well as stripped binaries in one shot. While at it, we're updating the Windows readme. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> Signed-off-by: Mike Latimer <mlatimer@suse.com>
* rbd: allow mounting images on WindowsLucian Petrut2020-11-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change will allow mapping rbd images on Windows, leveraging the WNBD[1] Virtual Storport Miniport driver [2]. The behavior and CLI is similar to the Linux rbd-nbd, with a few notable differences: * device paths cannot be requested. The disk number and path will be picked by Windows. If a device path is provided by the user when mapping an image, it will be used as an identifier, which can also be used when unmapping the image. * the "show" command was added, which describes a specific mapping. This can be used for retrieving the disk path. * the "service" command was added, allowing rbd-wnbd to run as a Windows service. All mappings are currently perisistent, being recreated when the service stops, unless explicitly unmapped. The service disconnects the mappings when being stopped. * the "list" command also includes a "status" column. The purpose of the "service" mode is to ensure that mappings survive reboots and that the Windows service start order can be adjusted so that rbd images can be mapped before starting services that may depend on it, such as VMMS. The mapped images can either be consumed by the host directly or exposed to Hyper-V VMs. While at it, we'll skip building rbd-mirror as it's quite unlikely that this daemon is going to be used on Windows for now. [1] https://github.com/cloudbase/wnbd [2] https://docs.microsoft.com/en-us/windows-hardware/drivers/storage/overview-of-storage-virtual-miniport-drivers Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
* [win32] Add build scriptsLucian Petrut2020-02-191-0/+329
This patch adds a couple of scripts that can be used for building Ceph for Windows along with its dependencies. For now, we're going to cross compile it using mingw. It's supposed to run on Ubuntu (feel free to update the command that's installing some of the dependencies within win32_deps_build.sh if you're interested in other distros). This commit also adds a short readme, describing the focus of the Windows porting effort, the building process and the current status. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>