Repository navigation
build stembuild
Note: you can only build on your host OS. You cannot cross compile.
-
ovftool(VMWare) on your path -
librsynchttps://github.com/charlievieth/librsync - cmake
Stembuild applies a binary diff to a source vhd and creates a stemcell. The binary diff creation is dependent upon rdiff (located in librsync), and is why stembuild cannot be cross compiled. This is because one of the rdiff dependencies (POP3) is not supported in windows. In order to get around this, a shim has been written in go that is not dependent upon POP3.
Cmake is used to create the necessary header files so that compilation can succeed. You should only have to generate these files once since we only care about the rdiff files.
To generate the correct files in linux:
- check out the correct librsync branch
- (Linux and Darwin) mingw64-fseeko64-v2.0.0
- (Windows) mingw64-fseeko64-v2.0.0-windows
- open cmake
- set source folder to librsync
- set destination folder to librsync/build
- set CMAKE_INSTALL_PREFIX=librsync/install
- set CMAKE_BUILD_TYPE=release
- click configure
- click generate (this generates the .h files)
- copy all source and header files from
librsync/srcintostembuild/rdiff/ - copy all source and header files from
librsync/build/srcintostembuild/rdiff/ - remove rdiff/rdiff.c (this is because we have rewritten this in go
rdiff.go)
Other environments are similar. Use your best judgment or fill in the details here. The windows branch does attempt to build the rdiff executable and does not require the BZIP2 and ZLIB libraries
librsync: ERROR: (rs_file_copy_cb) seek failed: Invalid argument
renaming stemcell to bosh-stemcell-1200.9.4-build.7-vsphere-esxi-windows2012R2-go_agent.tgz
librsync: ERROR: (rs_job_complete) patch job failed: IO error
Error: RS_IO_ERROR: IO error
This is because you did not use the correct branch when compiling. Use the Windows branch for Windows, and the default branch for the others.