Fossil

Artifact [7f5e14f6f9]
Login

Artifact 7f5e14f6f97c0321bc49dccc07f729334ae9dc0fcc0674f9950d9b8764010f03:

Wiki page [Release Build How-To] by drh 2020-04-25 21:01:08.
D 2020-04-25T21:01:08.074
L Release\sBuild\sHow-To
N text/x-markdown
P cd82c8321bbf31b54d6c217940c99497c69e4066229ef6dddb0d910294fd5328
U drh
W 3378
# Notes on how Fossil precompiled binaries are built and uploaded

## Download Page

  *  `fossil uv edit download.js`
  *  Edit the "releases" variable in the javascript
     to add the new release number and title and various
     hyperlinks.  Perhaps also remove older releases.
  *  Remove obsolete build products: `fossil uv rm $FILETODELETE`
  *  `fossil uv sync`

## Linux

  *  `./configure --static --disable-fusefs`
  *  Edit the Makefile to move -ldl to the end
  *  `CFLAGS="-Os" make -e clean fossil`
  *  `strip fossil`
  *  `tar czf fossil-linux-x64-$VERSION.tar.gz fossil`
  *  `fossil uv add fossil-linux-x64-$VERSION.tar.gz`
  *  `fossil uv sync`

## Linux (alternative procedures)

  *  Log into www.fossil-scm.org
  *  cd to /home/www/fossil/b1
  *  Run the script ./rebuild.sh
  *  Logout
  *  Download the file www.fossil-scm.org:/home/www/usr/bin/fossil
  *  `strip fossil`
  *  `tar czf fossil-linux-x64-$VERSION.tar.gz fossil`
  *  `fossil uv add fossil-linux-x64-$VERSION.tar.gz`
  *  `fossil uv sync`

## Raspberry Pi

  *  Edit Makefile so that instead of -lssl and -lcrypto
     there are complete paths to the libssl.a and
     libcrypto.a files.
  *  `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


  *  On the Windows 10 laptop in a MinGW shell in ~/fossil/m1
  *  `fossil clean -x`
  *  `make -f win/makefile.mingw FOSSIL_ENABLE_SSL=1 OPENSSLDIR=../../openssl-1.0.1t`
  *  **OR:** `tclsh ../mkfossil.tcl`
  *  `zip fossil-w32-$VERSION.zip fossil.exe`
  *  `fossil uv add fossil-w32-$VERSION.zip`
  *  `fossil uv sync`

## Windows 64-bit

  *  Compile OpenSSL-1.1.1g.  (See below)
  *  Get a "x64 Native Tools Command Prompt" window.
  *  Cd to the win/ subfolder of the Fossil source tree.
  *  Edit Makefile.msc to make SSLDIR point to the top-level directory
     for the OpenSSL build.  Not necessary if it is already
     in the compat/openssl-1.1.1g subdirectory.
  *  `nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 clean fossil.exe`
  *  `zip fossil-w64-$VERSION.zip fossil.exe`
  *  `fossil uv add fossil-w64-$VERSION.zip`
  *  `fossil uv sync`

## Mac

  *  `./configure`
  *  Edit the Makefile to specify /usr/local/opt/openssl/lib/libcrypto.a 
     and /usr/local/opt/openssl/lib/libssl.a in place of
     -lcrypto and -lssl, and to add -liconv at the end
  *  `CFLAGS="-Os" make -e clean fossil`
  *  Verify no shared library dependencies using:  `otool -L ./fossil`
  *  `strip fossil`
  *  `codesign -s drh@sqlite.org fossil`
  *  Verify the signature using: `codesign -d -v fossil`
  *  `tar czf fossil-macosx-$VERSION.tar.gz fossil`
  *  `fossil uv add fossil-macosx-$VERSION.tar.gz`
  *  `fossil uv sync`

## Source Tarball

  *  `fossil tarball --name fossil-$VERSION version-$VERSION fossil-src-$VERSION.tar.gz`

---------------------

## Building OpenSSL 1.1.1 On Windows 64-bit with MSVC

  *  Download and unpack the OpenSSL source tarball
  *  Install Strawberry perl
  *  Get a "x64 Native Tools Command Prompt"
  *  CD to the top of the OpenSSL source directory
  *  `c:/strawberry/perl/bin/perl Configure VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers no-shared`
  *  `nmake /f makefile`

Z 39eae9ce97d41b7cf37a222b6cd2e1d4