Skip to content

Commit

Permalink
Release procedure: update to no longer depend of autoconf (refs OSGeo…
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jul 7, 2022
1 parent d634feb commit b6b73be
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 108 deletions.
87 changes: 26 additions & 61 deletions HOWTO-RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ Prerequisites:

Process :

1) a) Regenerate configure using autogen.sh and commit if changed.
b) Regenerate swig generated files for python bindings and commit if changed.
1) a) Regenerate swig generated files for python bindings and commit if changed.
Currently SWIG 4.0.2 is used.

There is often a reference system on which this should be done (i.e. Frank's
dev workstation) to avoid unnecessary churn from different autoconf or swig
versions.

c) "cd scripts; make completion" to regenerate scripts/gdal-bash-completion.sh
b) "cd scripts; make completion" to regenerate scripts/gdal-bash-completion.sh
if new command line switches have been added. scripts/completionFinder.py
must also be edited before if new utilities/scripts are added/removed.

Expand All @@ -55,12 +51,8 @@ Process :

3.2) For major releases update the VERSION macro in nmake.opt (for 1.6, 1.7etc)

4) Update LIBGDAL_CURRENT/REVISION/AGE macros in GDALmake.opt.in.
- For a release with no interface changes just bump REVISION.
- Adding interfaces, bump CURRENT/AGE, set REVISION to 0.
- Deleting/changing interfaces in C or C++ API, or modification of
the C++ ABI (e.g. addition of virtual method, new argument with default value, etc.):
bump CURRENT, set others to zero.
4) Update the GDAL_SOVERSION number at top of gdal.cmake according to the
directions given in the comment preceding it.

5) Prepare release overview in the NEWS file. For example, to get all changes
from v3.4.0 to current HEAD
Expand Down Expand Up @@ -217,22 +209,24 @@ the GDAL package by one of the current owners : HowardB/FrankW/EvenR)

15.2) create gdal sdist and upload to pypi:

a) cd swig/python
a) Create a build directory if not already done. Go to it and run cmake

b) python setup.py sdist
b) cd $BUILD_DIR/swig/python

c) Check the output:
c) python setup.py sdist

d) Check the output:
twine check dist/GDAL-*.gz

d) For trial :
e) For trial :
twine upload dist/GDAL-*.gz -r pypitest

e) For real :
f) For real :
twine upload dist/GDAL-*.gz

15.3) create gdal-utils wheel and upload to pypi:

a) cd swig/python/gdal-utils
a) cd $BUILD_DIR/swig/python/gdal-utils

b) python setup.py bdist_wheel

Expand All @@ -245,41 +239,14 @@ the GDAL package by one of the current owners : HowardB/FrankW/EvenR)
d) For real :
twine upload dist/gdal_utils-*.whl

16) Build and bundle the java bindings.

a) cd swig/java

b) Make any updates to java.opt that might be required for the platform. For
example osx and windows users will have to change JAVA_INCLUDE to contain
include/darwin and include/win32 respectively.

c) Build the bindings:

make

17) Build maven artifacts. NOTE: This step only works on Linux and OSX since it
requires a shell script to build javadocs.

A quick one-liner for this step is:

ant maven_sign -Dgpg.key=... -Dgpg.pass=...

This will build and sign the artifacts with a single command. Read on for
more details.

a) Build the maven artifacts:

ant maven

Upon success maven artifacts should be located in the build/maven directory.

b) Sign maven artifacts with GPG. This step is required in order to deploy the
16) Generate signed maven artifacts with GPG for Java bindings.
This step is required in order to deploy the
maven artifacts to the central Maven repository. Before this step can
proceed you must set up a signing key as described here:

http://central.sonatype.org/pages/working-with-pgp-signatures.html

Each developer can use their own signing key although it is usually best to
a) Each developer can use their own signing key although it is usually best to
avoid constantly using a different key for releases as users will need to
import the public key in order to verify the artifacts.

Expand All @@ -291,20 +258,18 @@ b) Sign maven artifacts with GPG. This step is required in order to deploy the

See the above link for more details.

Once a key is set up run the "maven_sign" ant target. The target takes two
parameters specified as system properties:
b) Run CMake with the following variables:

1. gpg.key - The identifier for the signing key
2. gpg.pass - The passphrase for the signing key (optional)
1. GPG_KEY: the identifier for the signing keys
2. GPG_PASS: the passphrase for the signing key (optional)

ant maven_sign -Dgpg.key=... -Dgpg.pass=...
c) Build the bindings: make java_binding

Upon success you should see maven artifacts along with generated signatures
in the build/maven directory. You will also find a file named "bundle.jar"
Upon success you should see a file named "swig/java/build/maven/bundle.jar"
that contains all the maven artifacts with signatures. This file is what
will be uploaded to maven central. See the next step.

18) Deploy maven artifacts to Maven central.
17) Deploy maven artifacts to Maven central.

NOTE: Before you can deploy to maven central you must set up an account
in Sonatype JIRA. That can be done here:
Expand Down Expand Up @@ -349,19 +314,19 @@ e) Click the "Release" button and that is it! The release should be available in
Maven Central shortly. You can verify this by going to search.maven.org and
searching for "gdal".

19) Create a release on GitHub
18) Create a release on GitHub
Go to https://github.com/OSGeo/gdal/releases/new
And create a release for the vX.Y.Z tag
Attach the gdal-X.Y.Z.tar.gz, gdal-X.Y.Z.tar.gz.md5, gdalXYZ.zip, gdalXYZ.zip.md5 and gdalautotest-X.Y.Z.zip files

20) Regenerate Docker images
19) Regenerate Docker images

e.g
./docker/build-all.sh --with-multi-arch --release --tag 3.3.1 --gdal v3.3.1 --proj 8.1.0 --platform linux/arm64,linux/amd64 --push

and update docker/README.md with the latest release

21) Announce release to :
20) Announce release to :
- major release: [email protected], [email protected], [email protected].
- bugfix release: [email protected], [email protected]

Expand All @@ -373,7 +338,7 @@ Note: gdal-announce@ is moderated. Make sure that your email address is approved
('mod' tick disabled in https://lists.osgeo.org/mailman/admin/gdal-announce/members),
or your message manually approved, with an administrator of the list.

22) For a feature release: after it has been done, in the master branch, update
21) For a feature release: after it has been done, in the master branch, update
the VERSION to the next one and in gcore/gdal_version.h.in, update
GDAL_VERSION_MAJOR/_MINOR, GDAL_RELEASE_NAME (with a dev suffix, like "3.5.0dev"),
and set GDAL_RELEASE_DATE to a date like {YEAR}9999.
Expand Down
15 changes: 1 addition & 14 deletions cmake/helpers/GdalVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,7 @@ if (WIN32 AND NOT MINGW)
set(GDAL_SOVERSION "")
set(GDAL_ABI_FULL_VERSION "${GDAL_VERSION_MAJOR}${GDAL_VERSION_MINOR}")
else()
file(READ ${PROJECT_SOURCE_DIR}/GDALmake.opt.in GDAL_MAKE_OPT_CONTENT)
# Once we have a CMake-only build, those variables will have to be manually set
string(REGEX MATCH "LIBGDAL_CURRENT[ \t]*:=[ \t]*([0-9]+)" GDAL_LIBTOOL_CURRENT "${GDAL_MAKE_OPT_CONTENT}")
string(REGEX MATCH "LIBGDAL_REVISION[ \t]*:=[ \t]*([0-9]+)" GDAL_LIBTOOL_REVISION "${GDAL_MAKE_OPT_CONTENT}")
string(REGEX MATCH "LIBGDAL_AGE[ \t]*:=[ \t]*([0-9]+)" GDAL_LIBTOOL_AGE "${GDAL_MAKE_OPT_CONTENT}")
string(REGEX MATCH "([0-9]+)" GDAL_LIBTOOL_CURRENT "${GDAL_LIBTOOL_CURRENT}")
string(REGEX MATCH "([0-9]+)" GDAL_LIBTOOL_REVISION "${GDAL_LIBTOOL_REVISION}")
string(REGEX MATCH "([0-9]+)" GDAL_LIBTOOL_AGE "${GDAL_LIBTOOL_AGE}")
if( (GDAL_LIBTOOL_CURRENT STREQUAL "") OR (GDAL_LIBTOOL_REVISION STREQUAL "") OR (GDAL_LIBTOOL_AGE STREQUAL "") )
message(FATAL_ERROR "Missing libtool numbers")
endif()

math(EXPR GDAL_SOVERSION "${GDAL_LIBTOOL_CURRENT} - ${GDAL_LIBTOOL_AGE}")
set(GDAL_ABI_FULL_VERSION "${GDAL_SOVERSION}.${GDAL_LIBTOOL_AGE}.${GDAL_LIBTOOL_REVISION}")
set(GDAL_ABI_FULL_VERSION "${GDAL_SOVERSION}.${GDAL_VERSION_MAJOR}.${GDAL_VERSION_MINOR}.${GDAL_VERSION_REV}")
endif ()

# Setup package meta-data
Expand Down
9 changes: 9 additions & 0 deletions gdal.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CMake4GDAL project is distributed under MIT license. See accompanying file LICENSE.txt.

# Increment the below number each time an ABI incompatible change is done,
# e.g removing a public function/method, changing its prototype (including
# adding a default value to a parameter of a C++ method), adding
# a new member or virtual function in a public C++ class, etc.
# This will typically happen for each GDAL feature release (change of X or Y in
# a X.Y.Z numbering scheme), but should not happen for a bugfix release (change of Z)
# Previous value: 31 for GDAL 3.5
set(GDAL_SOVERSION 31)

# Switches to control build targets(cached)
option(ENABLE_GNM "Build GNM (Geography Network Model) component" ON)
option(ENABLE_PAM "Set ON to enable Persistent Auxiliary Metadata (.aux.xml)" ON)
Expand Down
40 changes: 7 additions & 33 deletions mkgdaldist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi

GITURL="https://github.com/OSGeo/gdal"

if [ $# -lt 1 ] ; then
if [ $# -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
echo "Usage: mkgdaldist.sh <version> [-date date] [-branch branch|-tag tag] [-rc n] [-url url]"
echo " <version> - version number used in name of generated archive."
echo " -date - date of package generation, current date used if not provided"
Expand Down Expand Up @@ -136,31 +136,18 @@ rm -rf ci

CWD=${PWD}

#
# Generate ./configure
#
echo "* Generating ./configure..."
./autogen.sh
rm -rf autom4te.cache

#
# Generate man pages
#
echo "* Generating man pages..."

if test -f "doc/Makefile"; then
(cd doc; make man)
mkdir -p man/man1
cp doc/build/man/*.1 man/man1
rm -rf doc/build
rm -f doc/.doxygen_up_to_date
else
(cat Doxyfile ; echo "ENABLED_SECTIONS=man"; echo "INPUT=apps swig/python/gdal-utils/scripts"; echo "FILE_PATTERNS=*.cpp *.dox"; echo "GENERATE_HTML=NO"; echo "GENERATE_MAN=YES"; echo "QUIET=YES") | doxygen -
rm -f doxygen_sqlite3.db
rm -f man/man1/*_dist_wrk_gdal_gdal_apps_.1
fi
(cd doc; make man)
mkdir -p man/man1
cp doc/build/man/*.1 man/man1
rm -rf doc/build
rm -f doc/.doxygen_up_to_date

if test ! -d "man"; then
if test ! -f "man/man1/gdalinfo.1"; then
echo " make man failed"
fi

Expand All @@ -170,19 +157,6 @@ echo "* Cleaning doc/ and perftests/ under $CWD..."
rm -rf doc
rm -rf perftests

# They currently require SWIG 1.3.X, which is not convenient as we need
# newer SWIG for newer Python versions
echo "SWIG C# interfaces *NOT* generated !"

#
# Generate SWIG interface for C#
#
#echo "* Generating SWIG C# interfaces..."
#CWD=${PWD}
#cd swig/csharp
#./mkinterface.sh
#cd ${CWD}

#
# Make distribution packages
#
Expand Down

0 comments on commit b6b73be

Please sign in to comment.