Re: [GRASS-dev] Getting version number *before* starting
Vaclav Petras wenzesl...@gmail.com writes: On Thu, Jan 29, 2015 at 9:51 AM, Rainer M Krug rai...@krugs.de wrote: Hi I would, for implementation in spgrass7 in R, to be able to get the version number of GRASS GIS before starting GRASS. I know about the --version parameter of grass command. This is for human consumption and, as you point out below, has changed quite a bit - actually I think that the version info is just plainly missing from GRASS GIS 7.0.0RC1 as I think it should be before the license? {{{ $ grass64 --version GRASS GIS 6.4.4 Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 6.4.4 release is coordinated and produced by the... }}} Unfortunately for GRASS GIS 7 it is giving more the license and about then the version: {{{ $ grass71 --version Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 7.1.svn release is coordinated and produced by }}} Although, I'm running 71 from source code, so it might be different. To get general idea, here are examples what other projects have in --version: {{{ gcc --version gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO ... }}} {{{ pandoc --version pandoc 1.12.2.1 Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1. Syntax highlighting is supported for the following languages: ... }}} Yup - they all have the version in the first line, bur RC1 has it not - I think this is a bug? Thanks, Rainer I know that in the file , | GRASS_BASE_DIRECTORY/etc/VERSIONNUMBER ` the version number is stored, but I have two questions: 1) is this the same between systems (I saw it in Mac Linux and Windows)? 2) I assume the location of this file is very un-likely to change? 3) can the internal structure of the GDRASS_BASE_DIRECTORY be configured during the build process (particularly the bin/ and the location of VERSIONNUMBER), and if yes, how can I obtain the location of these folders? So: would there be any downside in just reading this file to determine the version of GRASS GIS, as the grass startup script seems to be reading from that file as well? Thanks, Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 signature.asc Description: PGP signature ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] Getting version number *before* starting
Vaclav Petras wenzesl...@gmail.com writes: On Thu, Jan 29, 2015 at 5:20 PM, Blumentrath, Stefan stefan.blumentr...@nina.no wrote: What about grass70 --config? Cheers Stefan --config does not work for 64. unfortunately not - but one could always make an exception for 64. For 70 it does not give version, only revision (of library I think). We should probably change the format to be more parseable. The line order is really not stable, I'm not sure what other do. $ grass71 --config x86_64-unknown-linux-gnu ./configure --enable-largefile=yes --with-nls --with-cxx --with-readline --with-pthread --with-proj-share=/usr/share/proj --with-geos=/usr/bin/geos-config --with-wxwidgets --with-cairo --with-opengl-libs=/usr/include/GL --with-freetype=yes --with-freetype-includes=/usr/include/freetype2/ --with-postgresql=yes --with-postgres-includes=/usr/include/postgresql --with-sqlite=yes --with-mysql=yes --with-mysql-includes=/usr/include/mysql --with-odbc=no --with-liblas=yes --with-liblas-config=/usr/bin/liblas-config gcc /home/vasek/dev/grass/gcc_trunk/dist.x86_64-unknown-linux-gnu 63639 }}} 70 --help has actually version number on the first line as 64 --version has but 64 --help does not have the version, except for usage (at least the one from Ubuntu package). I'm afraid we have to implement something better. What would it be? A parsable format would be really nice here, as most of the information needed is here. Some standard fields as - MAJOR version (e.g. 7) - MINOR version (e.g. 1) - PATCH version (e.g. 0) - version EXTENSION (e.g. alpha) - REVISION - PLATFORM (e.g. x86_64-unknown-linux-gnu) - grass BASE directory (e.g. /home/vasek/dev/grass/gcc_trunk/dist.x86_64-unknown-linux-gnu) (I assume the bin/ is in the base directory?) - the CONFIGURE options - possibly split into separate and multiple entries A format like the Debian Control Files Syntax [1], which is defined and easily parsable from different languages, would be the easiest. I don't know if something like this can be still incorporated into 7.0.0? This would be really nice and useful. Thanks, Rainer *From:* grass-dev-boun...@lists.osgeo.org [mailto: grass-dev-boun...@lists.osgeo.org] *On Behalf Of *Vaclav Petras *Sent:* 29. januar 2015 23:10 *To:* Rainer M Krug *Cc:* grass-dev@lists.osgeo.org *Subject:* Re: [GRASS-dev] Getting version number *before* starting On Thu, Jan 29, 2015 at 9:51 AM, Rainer M Krug rai...@krugs.de wrote: Hi I would, for implementation in spgrass7 in R, to be able to get the version number of GRASS GIS before starting GRASS. I know about the --version parameter of grass command. {{{ $ grass64 --version GRASS GIS 6.4.4 Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 6.4.4 release is coordinated and produced by the... }}} Unfortunately for GRASS GIS 7 it is giving more the license and about then the version: {{{ $ grass71 --version Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 7.1.svn release is coordinated and produced by }}} Although, I'm running 71 from source code, so it might be different. To get general idea, here are examples what other projects have in --version: {{{ gcc --version gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO ... }}} {{{ pandoc --version pandoc 1.12.2.1 Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1. Syntax highlighting is supported for the following languages: ... }}} I know that in the file , | GRASS_BASE_DIRECTORY/etc/VERSIONNUMBER ` the version number is stored, but I have two questions: 1) is this the same between systems (I saw it in Mac Linux and Windows)? 2) I assume the location of this file is very un-likely to change? 3) can the internal structure of the GDRASS_BASE_DIRECTORY be configured during the build process (particularly the bin/ and the location of VERSIONNUMBER), and if yes, how can I obtain the location of these folders? So: would there be any downside in just reading this file to determine the version of GRASS GIS, as the grass startup script seems to be reading from that file as well? Thanks, Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev Footnotes: [1] http://www.debian.org/doc/debian
Re: [GRASS-dev] Getting version number *before* starting
What about grass70 --config? Cheers Stefan From: grass-dev-boun...@lists.osgeo.org [mailto:grass-dev-boun...@lists.osgeo.org] On Behalf Of Vaclav Petras Sent: 29. januar 2015 23:10 To: Rainer M Krug Cc: grass-dev@lists.osgeo.org Subject: Re: [GRASS-dev] Getting version number *before* starting On Thu, Jan 29, 2015 at 9:51 AM, Rainer M Krug rai...@krugs.demailto:rai...@krugs.de wrote: Hi I would, for implementation in spgrass7 in R, to be able to get the version number of GRASS GIS before starting GRASS. I know about the --version parameter of grass command. {{{ $ grass64 --version GRASS GIS 6.4.4 Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 6.4.4 release is coordinated and produced by the... }}} Unfortunately for GRASS GIS 7 it is giving more the license and about then the version: {{{ $ grass71 --version Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 7.1.svn release is coordinated and produced by }}} Although, I'm running 71 from source code, so it might be different. To get general idea, here are examples what other projects have in --version: {{{ gcc --version gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO ... }}} {{{ pandoc --version pandoc 1.12.2.1 Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1. Syntax highlighting is supported for the following languages: ... }}} I know that in the file , | GRASS_BASE_DIRECTORY/etc/VERSIONNUMBER ` the version number is stored, but I have two questions: 1) is this the same between systems (I saw it in Mac Linux and Windows)? 2) I assume the location of this file is very un-likely to change? 3) can the internal structure of the GDRASS_BASE_DIRECTORY be configured during the build process (particularly the bin/ and the location of VERSIONNUMBER), and if yes, how can I obtain the location of these folders? So: would there be any downside in just reading this file to determine the version of GRASS GIS, as the grass startup script seems to be reading from that file as well? Thanks, Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 ___ grass-dev mailing list grass-dev@lists.osgeo.orgmailto:grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] Getting version number *before* starting
On Thu, Jan 29, 2015 at 9:51 AM, Rainer M Krug rai...@krugs.de wrote: Hi I would, for implementation in spgrass7 in R, to be able to get the version number of GRASS GIS before starting GRASS. I know about the --version parameter of grass command. {{{ $ grass64 --version GRASS GIS 6.4.4 Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 6.4.4 release is coordinated and produced by the... }}} Unfortunately for GRASS GIS 7 it is giving more the license and about then the version: {{{ $ grass71 --version Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 7.1.svn release is coordinated and produced by }}} Although, I'm running 71 from source code, so it might be different. To get general idea, here are examples what other projects have in --version: {{{ gcc --version gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO ... }}} {{{ pandoc --version pandoc 1.12.2.1 Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1. Syntax highlighting is supported for the following languages: ... }}} I know that in the file , | GRASS_BASE_DIRECTORY/etc/VERSIONNUMBER ` the version number is stored, but I have two questions: 1) is this the same between systems (I saw it in Mac Linux and Windows)? 2) I assume the location of this file is very un-likely to change? 3) can the internal structure of the GDRASS_BASE_DIRECTORY be configured during the build process (particularly the bin/ and the location of VERSIONNUMBER), and if yes, how can I obtain the location of these folders? So: would there be any downside in just reading this file to determine the version of GRASS GIS, as the grass startup script seems to be reading from that file as well? Thanks, Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] Getting version number *before* starting
On Thu, Jan 29, 2015 at 5:20 PM, Blumentrath, Stefan stefan.blumentr...@nina.no wrote: What about grass70 --config? Cheers Stefan --config does not work for 64. For 70 it does not give version, only revision (of library I think). We should probably change the format to be more parseable. The line order is really not stable, I'm not sure what other do. $ grass71 --config x86_64-unknown-linux-gnu ./configure --enable-largefile=yes --with-nls --with-cxx --with-readline --with-pthread --with-proj-share=/usr/share/proj --with-geos=/usr/bin/geos-config --with-wxwidgets --with-cairo --with-opengl-libs=/usr/include/GL --with-freetype=yes --with-freetype-includes=/usr/include/freetype2/ --with-postgresql=yes --with-postgres-includes=/usr/include/postgresql --with-sqlite=yes --with-mysql=yes --with-mysql-includes=/usr/include/mysql --with-odbc=no --with-liblas=yes --with-liblas-config=/usr/bin/liblas-config gcc /home/vasek/dev/grass/gcc_trunk/dist.x86_64-unknown-linux-gnu 63639 }}} 70 --help has actually version number on the first line as 64 --version has but 64 --help does not have the version, except for usage (at least the one from Ubuntu package). I'm afraid we have to implement something better. What would it be? *From:* grass-dev-boun...@lists.osgeo.org [mailto: grass-dev-boun...@lists.osgeo.org] *On Behalf Of *Vaclav Petras *Sent:* 29. januar 2015 23:10 *To:* Rainer M Krug *Cc:* grass-dev@lists.osgeo.org *Subject:* Re: [GRASS-dev] Getting version number *before* starting On Thu, Jan 29, 2015 at 9:51 AM, Rainer M Krug rai...@krugs.de wrote: Hi I would, for implementation in spgrass7 in R, to be able to get the version number of GRASS GIS before starting GRASS. I know about the --version parameter of grass command. {{{ $ grass64 --version GRASS GIS 6.4.4 Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 6.4.4 release is coordinated and produced by the... }}} Unfortunately for GRASS GIS 7 it is giving more the license and about then the version: {{{ $ grass71 --version Geographic Resources Analysis Support System (GRASS) is Copyright, 1999-2014 by the GRASS Development Team, and licensed under terms of the GNU General Public License (GPL) version =2. This GRASS 7.1.svn release is coordinated and produced by }}} Although, I'm running 71 from source code, so it might be different. To get general idea, here are examples what other projects have in --version: {{{ gcc --version gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO ... }}} {{{ pandoc --version pandoc 1.12.2.1 Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1. Syntax highlighting is supported for the following languages: ... }}} I know that in the file , | GRASS_BASE_DIRECTORY/etc/VERSIONNUMBER ` the version number is stored, but I have two questions: 1) is this the same between systems (I saw it in Mac Linux and Windows)? 2) I assume the location of this file is very un-likely to change? 3) can the internal structure of the GDRASS_BASE_DIRECTORY be configured during the build process (particularly the bin/ and the location of VERSIONNUMBER), and if yes, how can I obtain the location of these folders? So: would there be any downside in just reading this file to determine the version of GRASS GIS, as the grass startup script seems to be reading from that file as well? Thanks, Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev