Fossil

Artifact [e59c3149]
Login

Artifact [e59c3149]

Artifact e59c3149026793355b7a0a48074ab9524f39362448f79004fb5ba21505ede501:

Wiki page [Release Build How-To] by drh 2022-02-21 14:47:32.
D 2022-02-21T14:47:32.129
L Release\sBuild\sHow-To
N text/x-markdown
P 1fbd196172db0339324292ec9fff9ac132fa8849665521b6d66722b204779040
U drh
W 5010
# Notes on how Fossil deliverables are built and uploaded

  *  All builds statically link against OpenSSL, which is a library that is
     often missing from systems on which Fossil might be installed.  By statically
     linking with OpenSSL, the dependency on OpenSSL is omitted, making the
     precompiled binaries more portable.
  *  As of 2022-01-05, OpenSSL 3.0.1 is used for all builds.

## After-Release Checklist (This section is to jog the memory of the release manager)

  1.  `fossil uv edit download.js`
  2.  Edit the "releases" variable in the javascript
      to add the new release number and title and various
      hyperlinks.  Perhaps also remove older releases.
  3.  Remove obsolete build products: `fossil uv rm --glob $PATTERN`
  4.  `fossil uv edit latest-release.md`
  5.  Update the latest result tarball link
  6.  `fossil uv sync`

## Linux

  *  Set up in-tree OpenSSL:
     <ul>
     <li> Download the OpenSSL tarball and unpack it into `compat/openssl`
     <li> `cd` into the `compat/openssl` directory
     <li> `./config no-ssl3 no-weak-ssl-ciphers no-shared no-threads --openssldir=/usr/lib/ssl`
     <li> `CFLAGS=-Os make -e`
     </ul>
  *  `./configure --with-openssl=tree --disable-fusefs`
  *  If the Makefile contains a reference to `-lpthread`, remove it.
  *  `CFLAGS="-Os" make -e clean fossil`
  *  `strip fossil`
  *  Verify dependencies using "`ldd ./fossil`"
  *  `tar czf fossil-linux-x64-$VERSION.tar.gz fossil`
  *  `fossil uv add fossil-linux-x64-$VERSION.tar.gz`
  *  `fossil uv sync`

## Mac

  *  For x64 builds, use the circa 2010 Macbook Air running MacOS 10.13.6.  For arm64 builds
     use the 2020 miniMac running MacOS 12.0.1.
  *  Set up in-tree OpenSSL:
     <ul>
     <li> Download the OpenSSL tarball and unpack it into `compat/openssl`
     <li> `cd` into the `compat/openssl` directory
     <li> `./config no-ssl3 no-weak-ssl-ciphers no-shared no-threads no-asm --openssldir=/etc/ssl`
     <li> `CFLAGS=-Os make -e`
     </ul>
  *  `./configure --with-openssl=tree`
  *  `CFLAGS=-Os make -e clean fossil`
  *  Verify no shared library dependencies using:  `otool -L ./fossil`
  *  `strip fossil`
  *  Optional: `codesign -s drh@sqlite.org fossil` then verify the signature using
     `codesign -d -v fossil`
  *  `tar czf fossil-mac-ARCH-VERSION.tar.gz fossil` where ARCH is either x64 or arm64.
  *  `fossil uv add fossil-mac-ARCH-VERSION.tar.gz`
  *  `fossil uv sync`

## Raspberry Pi

  *  Set up in-tree OpenSSL:
     <ul>
     <li> Download the OpenSSL tarball and unpack it into `compat/openssl`
     <li> `cd` into the `compat/openssl` directory
     <li> `./config no-ssl3 no-weak-ssl-ciphers no-shared no-threads --openssldir=/usr/lib/ssl`
     <li> `CFLAGS=-Os make`
     </ul>
  *  `./configure --with-openssl=tree`
  *  `CFLAGS="-Os" make -e clean fossil && strip fossil`
  *  `tar czf fossil-pi-$VERSION.tar.gz fossil`
  *  `fossil uv add fossil-pi-$VERSION.tar.gz`
  *  `fossil uv sync`

## Windows 32-bit using MSVC

  *  Run all of the following from a "x32 Native Tools Command Prompt"
  *  Set up in-tree OpenSSL:
     <ul>
     <li> Install Strawberry-Perl if it is not already installed
     <li> Download the OpenSSL tarball and unpack under `compat/`
     <li> `cd` into the OpenSSL source directory
     <li> `C:/Strawberry/perl/bin/perl Configure VC-WIN32 no-asm no-ssl3 no-weak-ssl-ciphers no-shared /D_WIN32_WINNT=0x0501`
     <ul><li>
     The _WIN32_WINT definition on the `perl Configure` command, and the FOSSIL_ENABLE_WINXP=1 term on
     the second `nmake` command below, are necessary in order for this build to work on older
     WindowsXP machines.  See [forum thread 66f106195aaf289e](forum:/forumpost/66f106195aaf289e).</ul>
     <li> `nmake /f makefile`
     </ul>
  *  `cd` into the `win/` subfolder of the Fossil source tree.
  *  `nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_ENABLE_WINXP=1 OPTIMIZATIONS=4 clean fossil.exe`
  *  Verify dependencies: `dumpbin /dependents fossil.exe`
  *  `zip fossil-w32-$VERSION.zip fossil.exe`
  *  `fossil uv add fossil-w32-$VERSION.zip`
  *  `fossil uv sync`


## Windows 64-bit using MSVC

  *  Run all of the following from a "x64 Native Tools Command Prompt"
  *  Set up in-tree OpenSSL:
     <ul>
     <li> Install Strawberry-Perl if it is not already installed
     <li> Download the OpenSSL tarball and unpack under `compat/`
     <li> `cd` into the OpenSSL source directory
     <li> `C:/Strawberry/perl/bin/perl Configure VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers no-shared`
     <li> `nmake /f makefile`
     </ul>
  *  `cd` into the `win/` subfolder of the Fossil source tree.
  *  `nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 OPTIMIZATIONS=4 clean fossil.exe`
  *  Verify dependencies: `dumpbin /dependents fossil.exe`
  *  `zip fossil-w64-$VERSION.zip fossil.exe`
  *  `fossil uv add fossil-w64-$VERSION.zip`
  *  `fossil uv sync`

Z c5f38c02f9337226b94dd0bd1832faa5