Releases and Patching: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
 
(72 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Releases ==
== Releases ==
The deliverables are:  
The deliverables are:  
* the tar.gz files (server-debian-postgresql, server-debian-centos, client) which could be the base for manual installs, and for RPMS
* the tar.gz binary file which could be the base for manual installs, and for RPMS. see https://get.openpetra.org/latest
* the standalone installer for Windows
* the remote client installer for Windows (not published on Sourceforge, since it would be bound to an IP address)
** a special tar.gz file that is used as a base for building the patches (see below)


=== Things todo for a SourceForge release ===
=== Things todo for an Open Source release ===
==== Update translations from/to Launchpad ====
* Download the latest language files from Launchpad using <code>nant translation</code>
** Adding new languages (if desired)
*** New languages might have been downloaded after running <code>nant translation</code>. These would show up in the 'Unversioned' section of Bazaar Explorer. If we really want to add one of those new languages to OpenPetra then perform these steps:
**** Add DLL in section '<code>[Files]</code>' in file <code>setup\petra0300\standalone\standalone.iss<code>;
***** e.g. <code>Source: ..\..\..\delivery\bin\es-ES\OpenPetra.resources.dll; DestDir: {app}/bin30/es-ES</code> for Spanish
**** Add language at task '<code>downloadTranslations<code>' in file <code>i18n\i18n.build</code>;
***** e.g. <code><move file="${dir.root}/i18n/de.po" tofile="${dir.root}/i18n/de-DE.po"/></code> for German
**** Bazaar-Add the language file that is showing in the 'Unversioned' bazaar section so it is under Version Control.
* Generate the latest translation template using <code>nant buildTranslationTemplate</code>
* Commit to Launchpad trunk using Bazaar.


==== Ensuring that all fixed Bugs have set "Fixed in Version" ====
==== Short version ====
We need to make sure that everyone has set "Fixed in Version" on all the bugs that have 'Closed' or 'Resolved' state
* develop on dev branch.
* Test with Appveyor (https://ci.openpetra.org), Test mysql on LBS (https://lbs.solidcharity.com/package/solidcharity/openpetra/openpetra-test-server-mysql).
* update Release Notes in https://github.com/openpetra/openpetra/tree/dev/setup/petra0300/releasenotes; see python script get_issues.py https://gist.github.com/tpokorra/d608a8dde183e7bb51f135e052b301cc
* merge into test branch.
* update Weblate and Sync translations to/from Github: https://weblate.openpetra.org/
* build the binary tarball on lbs (https://lbs.solidcharity.com/package/solidcharity/openpetra/openpetra-bin-tarball)
* done automatically: update https://get.openpetra.org/openpetra-latest-bin.tar.gz to point to the new tarball
* install on demo.test.openpetra.org (similar to demo.openpetra.org)
* try to run /home/openpetra/openpetra-server.sh update
* build the latest demo databases: https://lbs.solidcharity.com/package/solidcharity/openpetra/demodb
* then again build the binary tarball so that the latest base.yml.gz is included, and rebuild openpetranow-mysql-test
* download the latest demo database to the demo.openpetra.org container
* try restore demo database from command line. try running month end. try a report. try to edit partner
* install on demo.openpetra.org
* merge to master, and prod
* Github: tag the release, set the milestone date, close the milestone
* post release notes on the forum and on the github release, link on twitter/facebook, fediverse, and on OpenPetra Download Blog
* build prod openpetranow package
* install on hosted OpenPetra.com. test with my instance: "www.openpetra.com test Zugang"


* Using Mantis, filter for all bugs with 'Closed' and 'Resolved' state that have "Fixed in Version" equals NONE.
==== What can/should be done a day or even a few days before the actual release date====
* Run the MantisUpdateVersions Tool
Performing all the steps that are listed here on this page can take - on average - a day if the last release has been some months ago. However, the time it takes on the day of the release can potentially be reduced by doing several steps a day or even a few days in advance.
** The tool resides in \setup\tools\MantisUpdateVersions. As it isn't get built by <code>nant generateSolution</code> you need to load the C# Project 'MantisUpdateVersions.csproj' into your favourite IDE and compile it.
 
** Open a command shell and change the directory to <code>'...\setup\tools\MantisUpdateVersions\obj\x86\Debug'</code>
These are the steps that can be done before the actual release:
** Execute the following command: <code>MantisUpdateVersions.exe -sf-username:pokorra -sf-pwd:xyz -bug-id:abc,def,ghi -version-fixed-in:"Alpha 0.2.20"</code>, replacing the value for <code>-sf-username</code> and <code>-sf-pwd</code> with your SourceForge username and password and <code>abc,def,ghi</code> with the 1..n Mantis Bug ID's that you found with the Mantis filter step.
===== Testing the release packages before the release =====
* create a branch called test in https://github.com/tpokorra/openpetra
* increase the version in db/version.txt to 2016.07.0-0
* build the test branch of the packages:
** https://lbs.solidcharity.com/package/solidcharity/openpetra/openpetra-bin-tarball
** https://lbs.solidcharity.com/package/solidcharity/openpetra/openpetranow-mysql-test
 
* [[Manual tests before a release]]
 
===== Preparing the text for the [[Releases and Patching#Release Notes|Release Notes]]=====
* Usually this can be done once the testing phase begins which precedes the release - that might even be a week before the release because even if there is still a major new functionality that might get added before the release will be done this will be known by now and can be written up already.
** Obviously the text needs to be looked at carefully at the day of the release, but most of time-consuming work will have been done by then.
=====Preparing up-to-date screenshots=====
* Check which (if any) screenshots on the 'Screenshots' page of the OpenPetra website need updating.  
* If any need updating and these screens won't change any more until the release is done, take those screenshots now and store them until the day of the release has come as this process takes some time.
** If any screenshot is to be replaced check the file name of the existing screenshot and name the new one accordingly.
** Screenshots are listed on that page in a smaller size, and when one clicks on them the full size is shown. The smaller size can also already be prepared in advance.
 
==== Update translations from/to Weblate ====
* Download the latest language files from Weblate. Do a synchronization, and that might create a pull request.


==== Release Notes ====
==== Release Notes ====
* Release Notes: the permalink does not work for Sourceforge Mantis
* Update Release notes files in <code>setup/petra0300/releasenotes</code>. (English: releasenotes.html, German: releasenotes_de.html)
** In Firefox (Chrome is bad with external links), go to https://sourceforge.net/apps/mantisbt/openpetraorg/view_all_bug_page.php, filter: fixed in version 0.0.2.0, hide none (includes closed and resolved bugs)
** Format:
** click on print, and store the file
*** never empty the contents of that file as it is meant to be cumulative!
** upload to eg. http://openpetraorg.sourceforge.net/ReleaseDetails/BugsFixed_Alpha-0.2.8.htm (username/openpetraorg@web.sourceforge.net:/home/project-web/openpetraorg/htdocs/ReleaseDetails)
*** rather, add the Release Notes that pertain to the current release on top of the file.
* Update Release notes in bzr, setup/petra0300/releasenotes
*** follow the format of the previous Release Notes.
* add new patch sql file to db/patches
* Commit the changed files to Launchpad trunk using Bazaar.
* Tag bzr
* push the trunk working tree to Sourceforge Bazaar: bzr push bzr+ssh://pokorra@openpetraorg.bzr.sourceforge.net/bzrroot/openpetraorg/trunk --no-strict


* On a windows machine: run <code>nant buildWindowsStandalone -D:ReleaseID=0.0.2.0</code>
* On a linux machine: run <code>nant buildLinuxSourceforgeRelease -D:ReleaseID=0.0.2.0</code>. bzr update, bzr revert. (on openpetrabuild: /home/timop/bzr)
* test installer on Windows and Linux


* Upload to SF: username@frs.sourceforge.net:/home/pfs/project/o/op/openpetraorg/openpetraorg
====DB Patches====
** link the release notes
* add new patch .cs and .sql file to https://github.com/openpetra/openpetra/tree/master/csharp/ICT/Petra/Server/lib/MSysMan/DBUpgrades
* Post Release Notes on website, twitter
* modify file <code>version.txt</code> in directory db/patches so it contains the Version Number of the OpenPetra release that you are creating.


* Update Mantis Tracker:
====Final Steps====
** add next release to all projects
===== Building the release =====
** use the tool <code>MantisUpdateVersions.exe -sf-username:pokorra -sf-pwd:*** -release-version:0.2.16.0</code> from setup/tools/
* increase the version in db/version.txt
* merge branch into master, and into test and prod branches
* rebuild the package in LBS
** https://lbs.solidcharity.com/package/solidcharity/openpetra/openpetranow-mysql-test
* create a tag and a release in https://github.com/openpetra/openpetra
 
===== Making the Release Known to the Public =====
====== Website ======
* Screenshots
** see [[Releases and Patching#Preparing_up-to-date_screenshots|above]] for the preparation of up-to-date screenshots
** update the 'Screenshots' page of the website (English, German).
* Release Notes
** Post Release Notes on the 'Download' page of the website (English, German).
*** Format of the Release Notes: refer to previous posts.
*** Include download link for the Windows Installer and the Linux packages that pertain to this release.
*** Include link to the static HTML file that contains the list of closed bugs that pertains to this release (created in an earlier step in these instructions).
* News Update
** If there is a News Update that corresponds with the release (which often is the case): post news update in the 'News' section of the website (English, German).
*** Format of the News Update: refer to previous posts.
*** Include link to the 'Download' page of the website (English, German).
 
====== Notifications ======
* Send out a 'Tweet' on Twitter
** Tweet about the release on twitter (English [user: openpetraorg], German [user: openpetraorgde])
** Format of the Tweet: refer to previous tweets that pertain to releases.
* Mailing Lists
** Send out information on mailing lists (English, German).
*** Content of the emails: exactly the same as in the tweets - except if there is a News Update that corresponds with the release: in this case the content of what got posted in the 'News' section of the website.


== Patches ==
== Patches ==
* we use the bsdiff algorithm from http://www.daemonology.net/bsdiff/ for binary diffs and patching
* see more about the [[patchtool]]


=== patching the database ===
=== patching the database ===
Standalone:
OP_CUSTOMER=op_dev /home/openpetra/openpetra-server.sh upgradedb
* standalone is always delivered with SQLite database
 
* we don't have patch installers yet. a full installer will update the program files, and add sql files for patching the database (setup\petra0300\standalone\patches). We cannot write to the user's directory, since the installer must be run as admin.
=== Testing the server upgrade ===
* on the next startup of OpenPetra Standalone by the user, csharp\ICT\Petra\Server\app\Main\ServerManager.cs EstablishDBConnection() will check for the database version, and UpdateSQLiteDatabase() will update the sqlite database
on a testing machine: test.openpetra.org
* this will also run "UPDATE s_system_defaults SET s_default_value_c = '{0}' WHERE s_default_code_c = 'CurrentDatabaseVersion';"
* Install the previous version on a clean container:
curl https://get.openpetra.org | bash -s old
* run the upgrade:
/home/openpetra/openpetra-server.sh update
* Test the login on https://test.openpetra.org
 
=== Reverting to previous version ===
export OLDVERSION="2020.04.0-3"
export TagDemoDB="UsedForNUnitTests-202004"
export OP_CUSTOMER=op_demo
yum remove openpetranow-mysql-test
yum install openpetranow-mysql-test-$OLDVERSION.x86_64 --enablerepo=lbs-solidcharity-openpetra
MYSQL_CMD="drop database $OP_CUSTOMER" /home/openpetra/openpetra-server.sh mysql
/home/openpetra/openpetra-server.sh initdb
demodbfile=/tmp/demoWith1ledger.yml.gz
curl --silent --location https://github.com/openpetra/demo-databases/raw/$TagDemoDB/demoWith1ledger.yml.gz > $demodbfile
/home/openpetra/openpetra-server.sh loadYmlGz $demodbfile
 
Now update:
yum clean expire-cache --disablerepo="*" --enablerepo="lbs-solidcharity-openpetra"
/home/openpetra/openpetra-server.sh update

Latest revision as of 04:25, 27 October 2021

Releases

The deliverables are:

Things todo for an Open Source release

Short version

What can/should be done a day or even a few days before the actual release date

Performing all the steps that are listed here on this page can take - on average - a day if the last release has been some months ago. However, the time it takes on the day of the release can potentially be reduced by doing several steps a day or even a few days in advance.

These are the steps that can be done before the actual release:

Testing the release packages before the release
Preparing the text for the Release Notes
  • Usually this can be done once the testing phase begins which precedes the release - that might even be a week before the release because even if there is still a major new functionality that might get added before the release will be done this will be known by now and can be written up already.
    • Obviously the text needs to be looked at carefully at the day of the release, but most of time-consuming work will have been done by then.
Preparing up-to-date screenshots
  • Check which (if any) screenshots on the 'Screenshots' page of the OpenPetra website need updating.
  • If any need updating and these screens won't change any more until the release is done, take those screenshots now and store them until the day of the release has come as this process takes some time.
    • If any screenshot is to be replaced check the file name of the existing screenshot and name the new one accordingly.
    • Screenshots are listed on that page in a smaller size, and when one clicks on them the full size is shown. The smaller size can also already be prepared in advance.

Update translations from/to Weblate

  • Download the latest language files from Weblate. Do a synchronization, and that might create a pull request.

Release Notes

  • Update Release notes files in setup/petra0300/releasenotes. (English: releasenotes.html, German: releasenotes_de.html)
    • Format:
      • never empty the contents of that file as it is meant to be cumulative!
      • rather, add the Release Notes that pertain to the current release on top of the file.
      • follow the format of the previous Release Notes.
  • Commit the changed files to Launchpad trunk using Bazaar.


DB Patches

Final Steps

Building the release
Making the Release Known to the Public
Website
  • Screenshots
    • see above for the preparation of up-to-date screenshots
    • update the 'Screenshots' page of the website (English, German).
  • Release Notes
    • Post Release Notes on the 'Download' page of the website (English, German).
      • Format of the Release Notes: refer to previous posts.
      • Include download link for the Windows Installer and the Linux packages that pertain to this release.
      • Include link to the static HTML file that contains the list of closed bugs that pertains to this release (created in an earlier step in these instructions).
  • News Update
    • If there is a News Update that corresponds with the release (which often is the case): post news update in the 'News' section of the website (English, German).
      • Format of the News Update: refer to previous posts.
      • Include link to the 'Download' page of the website (English, German).
Notifications
  • Send out a 'Tweet' on Twitter
    • Tweet about the release on twitter (English [user: openpetraorg], German [user: openpetraorgde])
    • Format of the Tweet: refer to previous tweets that pertain to releases.
  • Mailing Lists
    • Send out information on mailing lists (English, German).
      • Content of the emails: exactly the same as in the tweets - except if there is a News Update that corresponds with the release: in this case the content of what got posted in the 'News' section of the website.

Patches

patching the database

OP_CUSTOMER=op_dev /home/openpetra/openpetra-server.sh upgradedb

Testing the server upgrade

on a testing machine: test.openpetra.org

  • Install the previous version on a clean container:
curl https://get.openpetra.org | bash -s old
  • run the upgrade:
/home/openpetra/openpetra-server.sh update

Reverting to previous version

export OLDVERSION="2020.04.0-3"
export TagDemoDB="UsedForNUnitTests-202004"
export OP_CUSTOMER=op_demo
yum remove openpetranow-mysql-test
yum install openpetranow-mysql-test-$OLDVERSION.x86_64 --enablerepo=lbs-solidcharity-openpetra
MYSQL_CMD="drop database $OP_CUSTOMER" /home/openpetra/openpetra-server.sh mysql
/home/openpetra/openpetra-server.sh initdb
demodbfile=/tmp/demoWith1ledger.yml.gz
curl --silent --location https://github.com/openpetra/demo-databases/raw/$TagDemoDB/demoWith1ledger.yml.gz > $demodbfile
/home/openpetra/openpetra-server.sh loadYmlGz $demodbfile

Now update:

yum clean expire-cache --disablerepo="*" --enablerepo="lbs-solidcharity-openpetra"
/home/openpetra/openpetra-server.sh update