[postgis-tickets] r16291 - Backport changes to standardize debbie's packaging and ensure

Regina Obe lr at pcorp.us
Sun Jan 14 07:34:35 PST 2018


Author: robe
Date: 2018-01-14 07:34:35 -0800 (Sun, 14 Jan 2018)
New Revision: 16291

Added:
   branches/2.3/ci/debbie/postgis_make_dist.sh
   branches/2.3/ci/debbie/postgis_release_docs.sh
Modified:
   branches/2.3/HOWTO_RELEASE
   branches/2.3/NEWS
   branches/2.3/make_dist.sh
Log:
Backport changes to standardize debbie's packaging and ensure 
she builds tagged versions as well without manual intervention
Update HOWTO_RELEASE to reflect change
References #3985 for PostGIS 2.3


Modified: branches/2.3/HOWTO_RELEASE
===================================================================
--- branches/2.3/HOWTO_RELEASE	2018-01-13 20:16:17 UTC (rev 16290)
+++ branches/2.3/HOWTO_RELEASE	2018-01-14 15:34:35 UTC (rev 16291)
@@ -1,6 +1,6 @@
 How to release
 ~~~~~~~~~~~~~~
-Date: 2016-11-28
+Date: 2015-10-08
 
 Versioning Scheme
 -----------------
@@ -63,32 +63,34 @@
 - Edit README.postgis and set release date and version.
 - Add release notes in doc/release_notes.xml
 - Update Version.config to drop the "dev" suffix
-- Check extensions/upgradeable_versions.mk
-  and ensure all the previous released versions are listed in it
+- Add the "dev" suffixed version in extensions/upgradeable_versions.mk
+  and ensure all the previous released minor versions are listed in it
 - Update the README.md to reflect new to be created buildbot badges
-    (this should only be needed for trunk release)
+	(this should only be needed for trunk release)
 - Commit all changes
 - If this is a minor or major release (no branch exists):
-   $ base=https://svn.osgeo.org/postgis/
-   $ rev=2.3.x
-   $ svn copy -m "Branch $rev" $base/trunk $base/branches/$rev
+	   $ base=http://svn.osgeo.org/postgis/
+	   $ rev=x.x
+	   $ svn copy -m "Branch $rev" $base/trunk $base/branches/$rev
 
-   Go to: https://debbie.postgis.net and copy last branch version and make new job
-   a) Replace PostGIS_* string params with new version
-   b) Replace repository url with new branch repo url
-   c) Update the PostGIS_trunk by updating the PostGIS_* string params
-   d) create a new tagged branch job from latest tagged (and repeat a, b for this new tagged)
+	   Go to: https://debbie.postgis.net and copy last branch version and make new job
+	   a) Replace PostGIS_* string params with new version
+	   b) Replace repository url with new branch repo url
+	   c) Update the PostGIS_trunk by updating the PostGIS_* string params
+	   d) create a new tagged branch job from latest tagged (and repeat a, b for this new tagged)
 
-   Go to: ​https://trac.osgeo.org/postgis/ edit the matrix to reflect new branch
+	   Go to: ​https://trac.osgeo.org/postgis/ edit the matrix to reflect new branch
 
 - Tag branch:  (replace x.x and x.x.x with minor and micro version e.g 2.3, 2.3.1
-   $ base=http://svn.osgeo.org/postgis
+   $ base=http://svn.osgeo.org/postgis/
    $ brev=x.x
    $ rev=x.x.x
    $ svn copy -m "Tagged release $rev" $base/branches/$brev $base/tags/$rev
-- Run: sh make_dist.sh $rev (or use debbie for this)
-- Build and test generated tarball (including extension upgrade)
-- Copy tarball to web site and edit downloads page
+- Run: sh make_dist.sh $rev (note, debbie should have already done this,
+      and the file will be waiting in postgis.net/stuff)
+- Documentation should also have been built and should be in postgis.net/stuff
+- Test generated tarball (including extension upgrade)
+- Copy tarball, pdf, doc-html.. to http://download.osgeo.org/postgis/ web site and edit postgis.net/source page
 - Announce on e-mail
     - postgis-users
     - postgis-devel
@@ -96,21 +98,15 @@
     - osgeo-discuss
 - Update web sites
     - PostGIS News
-      -  https://git.osgeo.org/gogs/postgis/postgis.net/_content/posts
+      - https://git.osgeo.org/gitea/postgis/postgis.net/src/master/_content/posts
        a) create a new Post for current year making sure the page name starts with mm-dd
-       b) Update links on https://git.osgeo.org/gogs/postgis/postgis.net/_content/pages/source.html
+       b) Update links on https://git.osgeo.org/gitea/postgis/postgis.net/src/master/_content/pages/source.html
        c) commit and wait 5 minutes to see changes on website
     - PostGIS doc release versioned doc - http://postgis.net/documentation/
-     (For building pdf, debbie has tagged jobs
-       -- http://debbie.postgis.net:8080 (log in)
-       Create new job copy last tag e.g. PostGIS_2.0_tagged_docs to PostGIS_2.1_tagged_docs
-       and make appropriate edits and then just run.
-       Or just be lazy and bug Regina Obe to do this.
+     Verify the documentation is up to date (might need to change the apach config)
     - Wikipedia
     - Twitter
        This should automatically happen as a result of posting to PostGIS website since Planet PostGIS autotweets.
 - Update Trac and make old Milestone as completed
 - Push the revision number forward (see Versioning Scheme)
-- Add the newly released version to extensions/upgradeable_versions.mk and make sure all prior micros are present
-- Commit changes
-- Update version number on Debbie Jenkins branch job.
+- Remove the "dev" suffixed version from extensions/upgradeable_versions.mk

Modified: branches/2.3/NEWS
===================================================================
--- branches/2.3/NEWS	2018-01-13 20:16:17 UTC (rev 16290)
+++ branches/2.3/NEWS	2018-01-14 15:34:35 UTC (rev 16291)
@@ -1,5 +1,5 @@
 PostGIS 2.3.6
-2018/xx/xx
+2018/01/17
 
   * Bug Fixes and Enhancements
 
@@ -11,7 +11,7 @@
   - #3956, Brin opclass object does not upgrade properly (Sandro Santilli)
   - #3982, ST_AsEncodedPolyline supports LINESTRING EMPTY and MULTIPOINT EMPTY
            (Darafei Praliaskouski)
-  - #3975, ST_Transform runs query on spatial_ref_sys without schema 
+  - #3975, ST_Transform runs query on spatial_ref_sys without schema
            qualification. May cause restore issues. (Paul Ramsey)
 
 PostGIS 2.3.5

Added: branches/2.3/ci/debbie/postgis_make_dist.sh
===================================================================
--- branches/2.3/ci/debbie/postgis_make_dist.sh	                        (rev 0)
+++ branches/2.3/ci/debbie/postgis_make_dist.sh	2018-01-14 15:34:35 UTC (rev 16291)
@@ -0,0 +1,35 @@
+#!/bin/bash
+set -e
+## begin variables passed in by jenkins
+
+export PG_VER=9.6
+# export PGPORT=8442
+export OS_BUILD=64
+# export POSTGIS_MAJOR_VERSION=2
+# export POSTGIS_MINOR_VERSION=2
+# export POSTGIS_MICRO_VERSION=0dev
+export PROJECTS=/var/lib/jenkins/workspace
+export GEOS_VER=3.6
+export GDAL_VER=2.2
+export WEB_DIR=/var/www/postgis_stuff
+export PATH="${PGPATH}/bin:$PATH"
+export LD_LIBRARY_PATH="${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/lib:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/lib:${PGPATH}/lib"
+
+POSTGIS_MAJOR_VERSION=`grep ^POSTGIS_MAJOR_VERSION Version.config | cut -d= -f2`
+POSTGIS_MINOR_VERSION=`grep ^POSTGIS_MINOR_VERSION Version.config | cut -d= -f2`
+POSTGIS_MICRO_VERSION=`grep ^POSTGIS_MICRO_VERSION Version.config | cut -d= -f2`
+
+export CONFIGURE_ARGS="--with-pgconfig=${PROJECTS}/pg/rel/pg${PG_VER}w${OS_BUILD}/bin/pg_config --with-geosconfig=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/bin/geos-config --with-gdalconfig=${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/bin/gdal-config --with-sfcgal=/usr/bin/sfcgal-config --prefix=${PROJECTS}/pg/rel/pg${PG_VER}w${OS_BUILD}"
+
+#override the checkout folder used for building tar ball
+export newoutdir="postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}"
+
+#fake production build
+#export newoutdir="postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.0"
+
+sh make_dist.sh
+export package=${newoutdir}.tar.gz
+echo "The package name is $package"
+
+cp $package $WEB_DIR
+sh ci/debbie/postgis_release_docs.sh

Added: branches/2.3/ci/debbie/postgis_release_docs.sh
===================================================================
--- branches/2.3/ci/debbie/postgis_release_docs.sh	                        (rev 0)
+++ branches/2.3/ci/debbie/postgis_release_docs.sh	2018-01-14 15:34:35 UTC (rev 16291)
@@ -0,0 +1,74 @@
+#!/bin/bash
+export PG_VER=9.6
+# export PGPORT=8442
+export OS_BUILD=64
+# export POSTGIS_MAJOR_VERSION=2
+# export POSTGIS_MINOR_VERSION=2
+# export POSTGIS_MICRO_VERSION=0dev
+export PROJECTS=/var/lib/jenkins/workspace
+export GEOS_VER=3.6
+export GDAL_VER=2.2
+export WEB_DIR=/var/www/postgis_stuff
+export PGPATH=${PROJECTS}/pg/rel/pg${PG_VER}w${OS_BUILD}
+export PATH="${PGPATH}/bin:$PATH"
+export LD_LIBRARY_PATH="${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/lib:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/lib:${PGPATH}/lib"
+./autogen.sh
+
+
+
+POSTGIS_MAJOR_VERSION=`grep ^POSTGIS_MAJOR_VERSION Version.config | cut -d= -f2`
+POSTGIS_MINOR_VERSION=`grep ^POSTGIS_MINOR_VERSION Version.config | cut -d= -f2`
+POSTGIS_MICRO_VERSION=`grep ^POSTGIS_MICRO_VERSION Version.config | cut -d= -f2`
+
+chmod -R 755 /var/www/postgis_docs/manual-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}
+echo $PATH
+
+sh autogen.sh
+
+if [ -f GNUMakefile ]; then
+  make distclean
+fi
+
+#  --with-gdalconfig=${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/bin/gdal-config
+#  --without-raster
+
+CPPFLAGS="-I${PGPATH}/include"  \
+LDFLAGS="-L${PGPATH}/lib"  ./configure \
+  --with-pgconfig=${PGPATH}/bin/pg_config \
+  --with-geosconfig=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/bin/geos-config \
+  --without-raster
+make clean
+cd doc
+
+
+mv postgis.xml postgis.xml.orig
+sed -e "s:</title>:</title><subtitle><subscript>SVN Revision (<emphasis>${POSTGIS_SVN_REVISION}</emphasis>)</subscript></subtitle>:" postgis.xml.orig > postgis.xml
+
+make pdf
+rm -rf images
+mkdir images
+cp html/images/* images
+make epub
+make -e chunked-html 2>&1 | tee -a doc-errors.log
+#make update-po  #we do this only for trunk because transifex only follows trunk
+make -C po/ja/ local-html
+make -C po/de/ local-html
+make -C po/pt_BR/ local-html
+make -C po/ko_KR/ local-html
+package="doc-html-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.tar.gz"
+export outdir=html
+tar -czf "$package" --exclude='.svn' --exclude='.git' --exclude='image_src' "$outdir"
+#make update-po
+#make -C po/it_IT/ local-html
+#make -C po/pt_BR/ local-html
+#make pdf-localized
+
+mv postgis.xml.orig postgis.xml
+mkdir -p /var/www/postgis_docs/manual-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}
+mkdir -p /var/www/postgis_docs/manual-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}/images
+cp -R html/*.*  /var/www/postgis_docs/manual-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}
+cp -R html/images/* /var/www/postgis_docs/manual-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}/images
+chmod -R 755 /var/www/postgis_docs/manual-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}
+cp -R *.pdf /var/www/postgis_stuff/
+cp -R *.epub /var/www/postgis_stuff/
+cp -R $package /var/www/postgis_stuff/

Modified: branches/2.3/make_dist.sh
===================================================================
--- branches/2.3/make_dist.sh	2018-01-13 20:16:17 UTC (rev 16290)
+++ branches/2.3/make_dist.sh	2018-01-14 15:34:35 UTC (rev 16291)
@@ -6,7 +6,7 @@
 # -- postgis-x.y.0dev-r#####.tar.gz
 # sh make_dist.sh
 #
-# -- postgis-1.1.0.tar.gz 
+# -- postgis-1.1.0.tar.gz
 # sh make_dist.sh 1.1.0
 #
 # -- postgis-2.2.tar.gz  (from a branch)
@@ -18,8 +18,9 @@
 #
 #   CONFIGURE_ARGS    passed to ./configure call
 #   MAKE              useed for builds (defaults to "make")
+#   newoutdir  this variable can be overriden to control the outdir and package name.
+#              package name will be set to {newoutdir}.tar.gz if this variabe is overridden
 #
-#
 
 version=dev
 
@@ -82,8 +83,7 @@
   #cd -
 fi
 
-echo "Removing ignore files, make_dist.sh and HOWTO_RELEASE"
-find "$outdir" -name .\*ignore -exec rm -v {} \;
+echo "Removing make_dist.sh and HOWTO_RELEASE"
 rm -fv "$outdir"/make_dist.sh "$outdir"/HOWTO_RELEASE
 
 # generating configure script and configuring
@@ -92,8 +92,8 @@
 cd "$outdir"
 ./autogen.sh
 ./configure ${CONFIGURE_ARGS}
-# generating postgis_svn_revision.h for >= 2.0.0 tags 
-if test -f utils/svn_repo_revision.pl; then 
+# generating postgis_svn_revision.h for >= 2.0.0 tags
+if test -f utils/svn_repo_revision.pl; then
 	echo "Generating postgis_svn_revision.h"
 	perl utils/svn_repo_revision.pl $svnurl
 fi
@@ -131,16 +131,23 @@
   VMIC=`grep ^POSTGIS_MICRO_VERSION "$outdir"/Version.config | cut -d= -f2`
   VREV=`cat "$outdir"/postgis_svn_revision.h | awk '{print $3}'`
   version="${VMAJ}.${VMIN}.${VMIC}-r${VREV}"
-  newoutdir=postgis-${version}
+  #if newoutdir is not already set, then set it
+  if test "x$newoutdir" = "x"; then
+      newoutdir=postgis-${version}
+  else
+      package=${newoutdir}.tar.gz
+  fi
   rm -rf ${newoutdir}
   mv -v "$outdir" "$newoutdir"
   outdir=${newoutdir}
 fi
 
-package="postgis-$version.tar.gz"
+#if package name is not already set then set it
+if test "x$package" = "x"; then
+    package="postgis-$version.tar.gz"
+fi
 echo "Generating $package file"
 tar czf "$package" "$outdir"
 
 #echo "Cleaning up"
 #rm -Rf "$outdir"
-



More information about the postgis-tickets mailing list