add a snapshot version string to GRUB title
PATCH 1/1 add a snapshot version string to GRUB title
Many "GNU GRUB version 1.96" used in production are likely builds from more recent SVN snapshots. It would (IMO) be useful to have some info about the actual installed version.
This patch adds a script to generate some version info from ChangeLog and (if available) from SVN.
The version syntax is "PACKAGE_VERSION+DATE-N-rSVN" where DATE is the most recent date in ChangeLog and 'N' is the number of the entries for this date. If the last ChangeLog entry suggests that this is an official release, only "PACKAGE_VERSION" is used.
The current string is "1.96+20090702-1-r2391" or "1.96+20090702-1" if 'svn info' is not available.
The string is added to grub title only, utils are left out for now.
Regards,
Christian Franke
2009-07-02 Christian Franke <[email protected]>
Auto-generate a snapshot version string for GRUB title.
* Makefile.in: Add targets for genversionstr.sh. Add target and dependency for grub_version.h.
* configure.ac: Add genversionstr.sh to AC_CONFIG_FILES.
* genversionstr.sh.in: New script. Generates GRUB_VERSION string from ChangeLog.
* normal/main.c: Add include "grub_version.h". (grub_normal_init_page): Replace PACKAGE_VERSION by GRUB_VERSION in TITLE.
Makefile.in +10 -0
@@ -419,6 +419,16 @@ gensymlist.sh: gensymlist.sh.in config.status genkernsyms.sh: genkernsyms.sh.in config.status $(SHELL) ./config.status +genversionstr.sh: genversionstr.sh.in config.status + $(SHELL) ./config.status + +# Build version string +grub_version.h: genversionstr.sh ChangeLog + $(SHELL) ./genversionstr.sh > $@ || (rm -f $@ ; exit 1) + +normal_mod-normal_main.o: grub_version.h + + .PHONY: all install install-strip uninstall clean mostlyclean distclean .PHONY: maintainer-clean info dvi dist check
configure.ac +1 -1
@@ -529,6 +529,6 @@ else rm -rf include/grub/machine cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null fi -AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh]) +AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh genversionstr.sh]) AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) AC_OUTPUT
genversionstr.sh.in new file +77 -0
77 lines not on this page · raw message
normal/main.c +3 -1
@@ -29,6 +29,8 @@#include <grub/reader.h> #include <grub/menu_viewer.h> +#include "grub_version.h" +#define GRUB_DEFAULT_HISTORY_SIZE 50/* Read a line from the file FILE. */
@@ -375,7 +377,7 @@ grub_normal_init_page (void) {grub_uint8_t width, margin; -#define TITLE ("GNU GRUB version " PACKAGE_VERSION) +#define TITLE ("GNU GRUB version " GRUB_VERSION) width =grub_getwh () >>8 ; margin = (width - (sizeof (TITLE ) +7 )) /2 ;
Quoted 3 lines · Christian Franke
Many "GNU GRUB version 1.96" used in production are likely builds from more recent SVN snapshots. It would (IMO) be useful to have some info about the actual installed version.
I can tell from my experience with other projects that such suggestions appear when there is not enough leadership in the project, and nobody cares about producing stable releases.
It would be better to produce named prereleases or release candidates if we are not comfortable about releasing 1.97 right now.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 8 lines · Pavel Roskin
Quoted 3 lines · Christian Franke
Many "GNU GRUB version 1.96" used in production are likely builds from more recent SVN snapshots. It would (IMO) be useful to have some info about the actual installed version.
I can tell from my experience with other projects that such suggestions appear when there is not enough leadership in the project, and nobody cares about producing stable releases.
I personally care of making a stable release. Unfortunately I have no such authority. Only Marco and Okuji have.
The usefulness of such patch isn't limited to semi-fix the lack of stable release it's also useful for developers and testers to be sure that new version was indeed installed
Quoted 3 lines
It would be better to produce named prereleases or release candidates if we are not comfortable about releasing 1.97 right now.
1.97 is a pre-release anyway. The release would be 2.00
Quoted 11 lines
--
Regards,
Pavel Roskin_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 4 lines
Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
Quoted 10 lines · Pavel Roskin
Quoted 1 line · Christian Franke
Many "GNU GRUB version 1.96" used in production are likely builds from more recent SVN snapshots. It would (IMO) be useful to have some info about the actual installed version.
I can tell from my experience with other projects that such suggestions appear when there is not enough leadership in the project, and nobody cares about producing stable releases.
It would be better to produce named prereleases or release candidates if we are not comfortable about releasing 1.97 right now.
===========
I do think the world is ready for another stable release number, like 1.97 or 2.0, but in the mean time, I've been doing this in my build script.
echo "-- Starting Autogen.sh... --"
sed -e "s/,\[1\.96\],/,[$softversion],/" -i configure.ac ./autogen.sh
Where basically the $softversion is your svn number I label the build as. The above replaces the 1.96 found in the title bar with "svn2383" or whatever the svn number is at the time, so users will know what they are using.
But again, why not put a freeze on adding things, just fix the bugs so you can release a stable version number for those squeamish about using svn?
Regards,
Pat
Quoted 2 lines · BandiPat
But again, why not put a freeze on adding things, just fix the bugs so you can release a stable version number for those squeamish about using svn?
Fine with me. I think GRUB is in a pretty good state now for a release.
Perhaps I would still add the file access patch in LUA (without the ad-hoc multi-file operations), as LUA is not the core functionality and it's quite useless without file operations. Having that functionality in GRUB 1.97 would help start developing LUA programs for GRUB that don't require a subversion snapshot.
The already posted USB patches should be reviewed and applied too, but we should not promise full USB support in 1.97.
Signature · 2 lines
Regards, Pavel Roskin