Fossil

Artifact [94bb41e1c0]
Login

Artifact 94bb41e1c0da5b1a5c7623fc0cd15e5d17f3dbe98632e6a3f30f17932d462e36:

Wiki page [Release Build How-To] by danield 2024-11-13 17:31:43.
D 2024-11-13T17:31:43.603
L Release\sBuild\sHow-To
N text/x-markdown
P 828dd2e2198044daeb83485f01a6c8919e00632c0df2b4950a2cc8ad859fdf96
U danield
W 7320
# Notes on how Fossil deliverables are built and uploaded

  *  All builds are 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.
  *  The latest version of OpenSSL is used for new builds.
     As of 2024-11-06, OpenSSL 3.4.0 is being used.  Use the
     [fossil version -v](/help?cmd=version) to find out which version of
     OpenSSL your version of Fossil is linked against.

# Pre-Release Checklist

  *  If `pikchr.c` has been updated since the last release, be sure that its WASM
     build is up-to-date, [as documented in build.wiki](/doc/trunk/www/build.wiki#wasm).
     The easiest approach is simply to see if both [](/finfo/extsrc/pikchr.c) and
     [](/finfo/extsrc/pikchr.wasm) have the same checkin time. If the WASM build is out
     of date, the /pikchrshow app will be using a different pikchr version than the rest of
     fossil.

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

  1.  Verify that all items on the [Before-Release Checklist](/doc/trunk/test/release-checklist.wiki)
      have been run
  2.  Update the version number and related links on the homepage.
  3.  `fossil uv edit download.js`
  4.  Edit the "releases" variable in the javascript
      to add the new release number and title and various
      hyperlinks.  Perhaps also remove older releases.
  5.  Remove obsolete build products: `fossil uv rm --glob $PATTERN`
  6.  `fossil uv edit latest-release.md`
  7.  Update the latest result tarball link
  8.  `fossil uv edit releases.md`
  9.  Update the list of releases and move the "(latest)" suffix to
      new top-most entry.
  10. `fossil uv sync`

## Linux

  *  Build the in-tree OpenSSL library:
     <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

  *  Published Fossil builds use the lead developer's 2010 Macbook Air running MacOS 10.13.6 for x64
     and the lead devloper's minimac running MacOS 12.0.1 for arm.  Binaries are signed on the lead
     developer's 2017 iMac.  All that said, the following procedure should work on *any* Mac.
  *  Build the in-tree OpenSSL library:
     <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

  *  Build the in-tree OpenSSL library:
     <ul>
     <li> Download the OpenSSL tarball and unpack it into `compat/openssl`
     <li> `cd` into the `compat/openssl` directory
     <li> `./Configure linux-generic32 no-ssl3 no-weak-ssl-ciphers no-shared no-threads no-asm --openssldir=/usr/lib/ssl`
     <li> `CFLAGS=-Os make -e`
     </ul>
  *  `./configure --with-openssl=tree --static`
  *  `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"
  *  Build the in-tree OpenSSL library:
     <ul>
     <li> Install Strawberry-Perl (or similar) if it is not already installed.  Perl is needed to run the
          OpenSSL configuration script prior to building OpenSSL from sources.  Fossil itself does not use Perl.
     <li> Download the OpenSSL tarball and unpack under `compat/openssl`. Note that the OpenSSL tarball will
          unpack into `openssl-3.X.Y`.  You will need to rename that folder to just `openssl`.
     <li> `cd` into the OpenSSL source directory, `openssl`.
     <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`
     <ul><li>
     The previous step builds the stand-alone Fossil binary.  If that is all you want to accomplish, you can
     stop here.  The remaining steps describe how the stand-alone Fossil binary is published.</ul>
  *  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"
  *  Build the in-tree OpenSSL library:
     <ul>
     <li> Install Strawberry-Perl (or similar) if it is not already installed.  Perl is needed to run the
          OpenSSL configuration script prior to building OpenSSL from sources.  Fossil itself does not use Perl.
     <li> Download the OpenSSL tarball and unpack under `compat/openssl`.  Note that the OpenSSL tarball will
          unpack into `openssl-3.X.Y`.  You will need to rename that folder to just `openssl`.
     <li> `cd` into the OpenSSL source directory, `openssl`.
     <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`
     <ul><li>
     The previous step builds the stand-alone Fossil binary.  If that is all you want to accomplish, you can
     stop here.  The remaining steps describe how the stand-alone Fossil binary is published.</ul>
  *  Verify dependencies: `dumpbin /dependents fossil.exe`
  *  `zip fossil-w64-$VERSION.zip fossil.exe`
  *  `fossil uv add fossil-w64-$VERSION.zip`
  *  `fossil uv sync`

Z 41b0c333864f691bfe4a20f502875518