-
Notifications
You must be signed in to change notification settings - Fork 11
build stembuild
Note: you can only build on your host OS. You cannot cross compile.
Stembuild applies a binary diff to a source vhd and creates a stemcell. The binary diff creation is dependent upon rdiff
(located in librsync). rdiff
is dependenant upon (POP3) which is not supported in windows. In order to get around this, a shim has been written in go that is not dependent upon POP3.
-
ovftool
(VMWare) on your path -
librsync
https://github.com/charlievieth/librsync -
cmake
https://cmake.org/
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/src
intostembuild/rdiff/
- copy all source and header files from
librsync/build/src
intostembuild/rdiff/
- remove rdiff/rdiff.c (this is because we have rewritten this in go
rdiff.go
)
Other environments are similar. Be certain to use the correct librsync branch depending on the OS you are targeting
- Note: 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.