From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jun 19 20:42:20 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A8BB16A4CE for ; Sat, 19 Jun 2004 20:42:20 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C85043D31 for ; Sat, 19 Jun 2004 20:41:45 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i5JKeHRL021837 for ; Sat, 19 Jun 2004 20:40:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i5JKeH01021835; Sat, 19 Jun 2004 20:40:17 GMT (envelope-from gnats) Resent-Date: Sat, 19 Jun 2004 20:40:17 GMT Resent-Message-Id: <200406192040.i5JKeH01021835@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mike Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1524C16A4CE for ; Sat, 19 Jun 2004 20:35:34 +0000 (GMT) Received: from torres.uwaterloo.ca (torres.cs.uwaterloo.ca [129.97.15.126]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACD1B43D4C for ; Sat, 19 Jun 2004 20:35:33 +0000 (GMT) (envelope-from mpatters@torres.cs.uwaterloo.ca) Received: from torres.uwaterloo.ca (localhost [127.0.0.1]) by torres.uwaterloo.ca (8.12.10/8.12.10) with ESMTP id i5JKZICa096220; Sat, 19 Jun 2004 16:35:23 -0400 (EDT) (envelope-from mpatters@torres.cs.uwaterloo.ca) Received: (from mpatters@localhost) by torres.uwaterloo.ca (8.12.10/8.12.10/Submit) id i5JKZDmA096219; Sat, 19 Jun 2004 16:35:13 -0400 (EDT) (envelope-from mpatters) Message-Id: <200406192035.i5JKZDmA096219@torres.uwaterloo.ca> Date: Sat, 19 Jun 2004 16:35:13 -0400 (EDT) From: Mike To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: mike.patterson@unb.ca Subject: ports/68123: logjam 4.4 has a bug with syncing journals X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mike List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2004 20:42:20 -0000 >Number: 68123 >Category: ports >Synopsis: logjam 4.4 has a bug with syncing journals >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Jun 19 20:40:16 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Mike Patterson >Release: FreeBSD 5.2.1-RELEASE-p8 i386 >Organization: >Environment: System: FreeBSD torres 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #0: Sat Jun 5 11:31:25 EDT 2004 root@torres:/usr/obj/usr/src/sys/TORRES i386 >Description: The logjam client has a utility to create and maintain an offline copy of one's LiveJournal. However, there's a bug that causes it to crash whenever one attempts to sync. >How-To-Repeat: Sync your journal. Wait for a while. Watch it dump core. >Fix: LiveJournal user daviticus (David Charlton) submitted a patch that works on 4.x systems. Tested against 5.2 as well; it ought to work everywhere (also tested on Mac OS X 10.3 :) ). --- ljpatch_fixsync begins here --- diff -ruN logjam.old/Makefile logjam/Makefile --- logjam.old/Makefile Tue Jun 8 12:37:11 2004 +++ logjam/Makefile Sat Jun 19 16:10:11 2004 @@ -7,7 +7,7 @@ PORTNAME= logjam PORTVERSION= 4.4.0 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES= deskutils MASTER_SITES= http://logjam.danga.com/download/ diff -ruN logjam.old/files/patch-src::sync.c logjam/files/patch-src::sync.c --- logjam.old/files/patch-src::sync.c Wed Dec 31 19:00:00 1969 +++ logjam/files/patch-src::sync.c Sat Jun 19 16:08:41 2004 @@ -0,0 +1,15 @@ +--- protocol/liblivejournal/livejournal/sync.c.old Fri Jun 18 14:57:51 2004 ++++ protocol/liblivejournal/livejournal/sync.c Fri Jun 18 14:58:20 2004 +@@ -33,8 +33,10 @@ + static int + entry_date_compare_func(const void *a, const void *b) { + /* struct tm* cast needed to un-constify the times passed to mktime. */ +- const LJEntry *entrya = a; time_t timea = mktime((struct tm*)&entrya->time); +- const LJEntry *entryb = b; time_t timeb = mktime((struct tm*)&entryb->time); ++ const LJEntry *entrya = *(LJEntry **)a; ++ const LJEntry *entryb = *(LJEntry **)b; ++ time_t timea = mktime((struct tm*)&entrya->time); ++ time_t timeb = mktime((struct tm*)&entryb->time); + /* mktime actually converts the times to local time, which isn't + * quite correct, but since we're comparing times directly like this + * it should still sort the same way and timegm is potentially slower. */ --- ljpatch_fixsync ends here --- >Release-Note: >Audit-Trail: >Unformatted: