Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updates for setting up envirionment to build an MSI installer

...

In most cases, no other configuration should be necessary.

...

WiX Toolset

The sbt-native-packager plugin is used by Daffodil to generate a Windows MSI installer. The plugin depends on WiX Toolset to do the actual MSI generation, which unfortunately only works on Windows. However, the release script must be run on Linux. Below are the steps necessary to configure a Linux system to use the WiX Toolset from the plugin using wine.

  1.  Install wine and winetools for you system, for example on Fedora, run:

    Code Block
    languagebash
    $ dnf install wine winetools

      

  2. Run the command winecfg, and select Windows 10 as the Windows Version.

  3. Install dotnet45 into wine using winetools

    Code Block
    languagebash
    $ winetricks dotnet45

      

  4. Download wix311-binaries.zip from WiX Toolset version v3.11.1. Note that the wix311.exe setup installer does not work on wine, so it is important to download the precompiled binaries.

  5. Extract that zip into a WIX specific directory:

    Code Block
    languagebash
    $ mkdir ~/wix311/
    $ unzip wix311-binaries.zip -d ~/wix311/


  6. Run the following command to set the WIX environment variable to that directory. It is reccommended that this also be added to ~/.bashrc:

    Code Block
    languagebash
    $ export WIX=~/wix311/

      

  7. Add symbolic links to the the WIX directory that point to a custom script in the Daffodil repository:


    Code Block
    $ ln -s ~/incubator-daffodil/scripts/wix_wine.sh $WIX/\\bin\\candle.exe
    $ ln -s ~/incubator-daffodil/scripts/wix_wine.sh $WIX/\\bin\\light.exe

    Note that the bin, double-slashes, and .exe are necessary, as they work around assumptions made the the plugin about running on a Windows environment. 


Creating a Release Candidate

Warning

It is highly recommended that you create a new clone of the incubator-daffodil repository in the /tmp directory and perform the following steps in that clone. This is for two main reasons:

  1. This ensures that there are no stray files or commits in your deelopment repository that might lead to reproducability issues.
  2. Generating the Windows MSI installer can fail with "File Not Found" errors if file paths are too long. Cloning the repository into /tmp shortens the root path and reduces the chance of creating long paths that wine/Windows cannot support.
  1. Prior to creating the release candidate, the version setting in build.sbt should contain the -SNAPSHOT keyword. Create and merge a pull request to remove this keyword in preparation for a non-snapshot release.

       .

  2. From within the root of the Daffodil directory, execute the scripts/release-candidate.sh script, providing the release candidate label (e.g. rc1), the path to the root of apache-dist directory created above, that path the the root of the daffodil site repository, your Apache login credentials (e.g. for https://id.apache.org), and your long format gpg key id (e.g. gpg --list-keys --keyid-format long KEYID). Run the script like so:

    Code Block
    languagebash
    $ ./scripts/release-candidate.sh


    The credentials are used to publish the jars to the Apache staging repo. You will also be asked to enter the password for your private gpg key created above to sign the published jars and the zip/tars . This script will perform the following actions:

    1. Create a zip of the source

    2. Create tgz, zip, and rpm of the helper binary

    3. Create sha256 and sha512 checksum and ASCII armored detached signatures of the above files

    4. Move the above files to the Apache dist dev directory

    5. Create javadoc and scaladoc and move to the daffodil site repository docs directory for this release

    6. Stages jars/poms to https://repository.apache.org

    7. Create a signed git tag

  3. Once the script completes, you should verify all the files. This includes:

    1. Verify the checksums and signatures created in the Apache dist directories are correct

    2. Verify the staged jars/poms at https://repository.apache.org/ are correct. To do so, visit that url, login in the top right using id.apache.org credentials, select "Staging Repositories" on the left, and find the orgapachedaffodil-XXXX repository. Inspect the "Content" tab to make sure the appropriate jars are uploaded and appear valid.

    3. Verify the git tag is correct

    4. Verify the javadoc and scala docs in the daffodil site repository are correct

    If any of the above do not look correct you will need to rerun the release candidate script; however,  before doing so you must
     
    1. Delete the files in the Apache dist directory
       
    2. Drop the published jars/poms (at https://repository.apache.org - check the box for the staging repository just created and choose "Drop" at the top)
       
    3. Delete the git tag (git tag -d tagname).
        
    4. Delete the files in the daffodil site repository
       
    5. Fix whatever the issue is and repeat from step 2.

  4. After verifying all is correct, commit the changes:

    1. Commit the files in Apache dist, for example:

      Code Block
      languagebash
      svn add dev/incubator/daffodil/*
      svn ci -m "Stage Apache Daffodil (incubating) 2.0.0-rc1"


    2. Close the published Nexus files by visiting https://repository.apache.org, log in, find the release in "Staging Repositories" and select "Close".

    3. Push the git tag

      Code Block
      languagebash
      git push asf v2.0.0-rc1


...