ports/167726: FreeBSD patch for gthumb-2.14.1_1 is just plain wrong

Ronald F.Guilmette rfg at tristatelogic.com
Wed May 9 05:00:27 UTC 2012


>Number:         167726
>Category:       ports
>Synopsis:       FreeBSD patch for gthumb-2.14.1_1 is just plain wrong
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 09 05:00:27 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 8.3-RELEASE amd64
>Organization:
entropy
>Environment:
System: FreeBSD segfault.tristatelogic.com 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr 9 21:23:18 UTC 2012 root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


>Description:

There is file currently present in the ports tree called:

   /usr/ports/graphics/gthumb/files/patch-glib-utils.c

This patch (or something like it) is indeed necessary in order to make
gthumb-2.14.x build successfully.  However the patch itself is quite
self-evidently wrong.  It causes `offset' to always be set to zero,
to no apparently useful effect (since the value gets re-set to the
value of tm->tm_gmtoff just two lines further down in the code) and
also, the patch in question fails to make allowances for possible
host systems where neither HAVE_TM_GMTOFF nor HAVE_TIMEZONE are defined.

A more correct patch for gthumb-2.14.x is provided below.

>How-To-Repeat:

	cd /usr/ports/graphics/gthumb
	make

>Fix:

diff -rc2 gthumb/glib-utils.c gthumb/glib-utils.c
*** gthumb/glib-utils.c	2012-03-24 09:28:46.000000000 -0700
--- gthumb/glib-utils.c	2012-05-05 18:48:21.000000000 -0700
***************
*** 553,560 ****
  	int offset;
  
- 	offset = -timezone;
  #if defined (HAVE_TM_GMTOFF)
  	offset = tm->tm_gmtoff;
  #elif defined (HAVE_TIMEZONE)
  	if (tm->tm_isdst > 0) {
    #if defined (HAVE_ALTZONE)
--- 553,560 ----
  	int offset;
  
  #if defined (HAVE_TM_GMTOFF)
  	offset = tm->tm_gmtoff;
  #elif defined (HAVE_TIMEZONE)
+ 	offset = -timezone;
  	if (tm->tm_isdst > 0) {
    #if defined (HAVE_ALTZONE)
***************
*** 565,568 ****
--- 565,570 ----
  	} else
  		offset = -timezone;
+ #else
+ 	offset = 0;
  #endif
  
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list