--- libpst-0.5.orig/Makefile +++ libpst-0.5/Makefile @@ -1,4 +1,4 @@ -GCC_FLAGS=-g +GCC_FLAGS=-g ${CFLAGS} all: readpst getidblock readpstlog dumpblocks --- libpst-0.5.orig/libpst.c +++ libpst-0.5/libpst.c @@ -1802,6 +1802,8 @@ DEBUG_EMAIL(("Date sent - ")); MALLOC_EMAIL(item); LIST_COPY(item->email->sent_date, (FILETIME*)); + LE32_CPU(item->email->sent_date->dwLowDateTime); + LE32_CPU(item->email->sent_date->dwHighDateTime); DEBUG_EMAIL(("%s", fileTimeToAscii(item->email->sent_date))); // INC_CHECK_X(); break; --- libpst-0.5.orig/libpst.h +++ libpst-0.5/libpst.h @@ -27,22 +27,11 @@ # define INT32_MAX INT_MAX #endif -//#if !defined(LITTLE_ENDIAN) && !defined (BIG_ENDIAN) -# if defined __APPLE__ || defined __sparc__ -# include -# if BYTE_ORDER == BIG_ENDIAN -# define PST_BIG_ENDIAN 1 -# else -# define PST_LITTLE_ENDIAN 1 -# endif -# else -# define PST_LITTLE_ENDIAN 1 -//# define PST_BIG_ENDIAN 1 -# endif -//#endif +// According to Jan Wolter, sys/param.h is the most portable source of endian +// information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html +#include -// BIG_ENDIAN / LITTLE_ENDIAN defined in "libpst.h" -# if defined PST_BIG_ENDIAN +#if BYTE_ORDER == BIG_ENDIAN # define LE64_CPU(x) \ x = ((((x) & 0xff00000000000000) >> 56) | \ (((x) & 0x00ff000000000000) >> 40) | \ @@ -60,13 +49,13 @@ # define LE16_CPU(x) \ x = ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8)); -# elif defined PST_LITTLE_ENDIAN +#elif BYTE_ORDER == LITTLE_ENDIAN # define LE64_CPU(x) {} # define LE32_CPU(x) {} # define LE16_CPU(x) {} -# else +#else # error "Byte order not supported by this library" -# endif +#endif // BYTE_ORDER #ifdef _MSC_VER --- libpst-0.5.orig/lzfu.c +++ libpst-0.5/lzfu.c @@ -10,6 +10,7 @@ */ #include "define.h" +#include "libpst.h" #include #include #include @@ -66,6 +67,8 @@ memcpy(dict, LZFU_INITDICT, LZFU_INITLENGTH); dict_length = LZFU_INITLENGTH; memcpy(&lzfuhdr, rtfcomp, sizeof(lzfuhdr)); + LE32_CPU(lzfuhdr.cbSize); LE32_CPU(lzfuhdr.cbRawSize); + LE32_CPU(lzfuhdr.dwMagic); LE32_CPU(lzfuhdr.dwCRC); /* printf("total size: %d\n", lzfuhdr.cbSize+4); printf("raw size : %d\n", lzfuhdr.cbRawSize); printf("compressed: %s\n", (lzfuhdr.dwMagic == LZFU_COMPRESSED ? "yes" : "no")); @@ -85,6 +88,7 @@ // read 2 bytes from input unsigned short int blkhdr, offset, length; memcpy(&blkhdr, &(rtfcomp[in_size+0x10]), 2); + LE16_CPU(blkhdr); in_size += 2; /* swap the upper and lower bytes of blkhdr */ blkhdr = (((blkhdr&0xFF00)>>8)+ --- libpst-0.5.orig/debian/changelog +++ libpst-0.5/debian/changelog @@ -1,13 +1,29 @@ -libpst (0.4.3-2) unstable; urgency=low +libpst (0.5-3) unstable; urgency=low - * + * libpst.c: fix date/time on big-endian machines. + * added debian/watch file for upstream version tracking with uscan. - -- Dave Smith Fri, 3 Jan 2003 23:20:37 -0600 + -- Joe Nahmias Fri, 12 Mar 2004 00:32:19 -0500 -libpst (0.4.2-1) unstable; urgency=low +libpst (0.5-2) unstable; urgency=low - * Initial Release. - * Changed Makefile to install to /usr/bin - - -- Dave Smith Fri, 3 Jan 2003 20:14:25 -0600 + * libpst.h: Fix endian handling, closes: #236944. + * lzfu.c: Fix endian mixups. + -- Joe Nahmias Wed, 10 Mar 2004 23:58:03 -0500 + +libpst (0.5-1) unstable; urgency=low + + * New upstream release + * debian/copyright: updated download location. + * typo corrections in manpages (thanks era eriksson!) + + -- Joe Nahmias Tue, 24 Feb 2004 21:59:13 -0500 + +libpst (0.4.3-1) unstable; urgency=low + + * Initial Release (closes: #178113). + * Included critical updates that upstream sent me from CVS. + * Wrote manpage for readpstlog. + + -- Joe Nahmias Tue, 15 Apr 2003 18:55:00 -0400 --- libpst-0.5.orig/debian/control +++ libpst-0.5/debian/control @@ -1,16 +1,16 @@ Source: libpst Section: utils Priority: optional -Maintainer: Dave Smith -Build-Depends: debhelper (>> 3.0.0) -Standards-Version: 3.5.2 +Maintainer: Joe Nahmias +Build-Depends: debhelper (>> 4.0.0) +Standards-Version: 3.6.1 -Package: libpst +Package: readpst Architecture: any Depends: ${shlibs:Depends} Description: Converts Outlook PST files to mbox and others - LibPST is a great application that can take a PST file and - convert it into mbox, kmail, it's own recursive format, or - separate each email into it's own file. + ReadPST is an application that can take a Microsoft Outlook PST + (Personal Folders) file and convert it into mbox, kmail, its own + recursive format, or separate each email into its own file. . - It can currently handle EMails, Folders and most Contacts + It can currently handle emails, folders and most contacts. --- libpst-0.5.orig/debian/copyright +++ libpst-0.5/debian/copyright @@ -1,13 +1,26 @@ -This package was debianized by Dave Smith on -Fri, 3 Jan 2003 20:14:25 -0600. +This package was debianized by Joe Nahmias on +Thu, 6 Mar 2003 23:13:38 -0500. -It was downloaded from http://sf.net/projects/ol2mbox +It was downloaded from http://dl.sourceforge.net/sourceforge/ol2mbox/ Upstream Author: Dave Smith Copyright: -You are free to distribute this software under the terms of -the GNU General Public License. -On Debian systems, the complete text of the GNU General Public -License can be found in the file `/usr/share/common-licenses/GPL'. + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- libpst-0.5.orig/debian/docs +++ libpst-0.5/debian/docs @@ -1,6 +1,5 @@ -README -TODO AUTHORS CREDITS FILE-FORMAT FILE-FORMAT.html +README --- libpst-0.5.orig/debian/readpst.1 +++ libpst-0.5/debian/readpst.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH READPST 1 "January 27, 2003" "GNU" "readpst" +.TH READPST 1 "February 24, 2004" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -16,7 +16,7 @@ .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME -readpst \- program to convert PST files to mbox +readpst \- convert PST (MS Outlook Personal Folders) files to mbox format .SH SYNOPSIS .B readpst .RI [ options ] " files" ... @@ -28,11 +28,10 @@ .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. -\fBreadpst\fP is a program that can convert an Outlook PST file and -convert it into an mbox file, a format suitable for KMail, recursive -mbox structure or into seperate emails. +\fBreadpst\fP is a program that can read an Outlook PST (Personal Folders) file +and convert it into an mbox file, a format suitable for KMail, a recursive mbox +structure, or seperate emails. .SH OPTIONS -These programs follow the usual GNU command line syntax. A summary of options is included below. .TP .B \-d @@ -57,28 +56,27 @@ .B \-r Changes the output format to Recursive. This will create folders as named in the PST file, and will put all emails in a file called "mbox" -inside each folder. These files are then compatible with all mbox -compatible email clients. +inside each folder. These files are then compatible with all +mbox\-compatible email clients. .TP .B \-S -Changes the ouput format to Seperate. This will create folders as +Output messages into seperate files. This will create folders as named in the PST file, and will put each email in its own file. These files will be numbered from 000000000 increasing in intervals of 1 (ie 000000000, 000000001, 0000000002). Any attachments are saved alongside -each email as 000000000-attach0, or with the name of the attachment if +each email as 000000000\-attach0, or with the name of the attachment if one is present. .TP .B \-V Show version of program. .TP .B \-w -Overwrite any previous out files. \fBBeware\fP: When used with the -S -switch, will remove all files from the target folder before +Overwrite any previous output files. \fBBeware\fP: When used with the \-S +switch, this will remove all files from the target folder before writing. This is to keep the count of emails and attachments correct. -.TP -The programs are documented fully by -.IR "Dave Smith" - +.SH SEE ALSO +.BR readpstlog (1) .SH AUTHOR -This manual page was written by Dave Smith , -for the Debian GNU/Linux system (but may be used by others). +This manual page was written by Dave Smith , and updated +by Joe Nahmias for the Debian GNU/Linux system (but may be +used by others). --- libpst-0.5.orig/debian/rules +++ libpst-0.5/debian/rules @@ -1,50 +1,37 @@ #!/usr/bin/make -f +# -*- makefile -*- # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# This is the debhelper compatibility version to use. -export DH_COMPAT=3 +CFLAGS = -Wall -g - - -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 endif - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - +export CFLAGS build: build-stamp -build-stamp: configure-stamp +build-stamp: dh_testdir - # Add here commands to compile the package. $(MAKE) - #/usr/bin/docbook-to-man debian/libpst.sgml > libpst.1 touch build-stamp clean: dh_testdir dh_testroot - rm -f build-stamp configure-stamp + rm -f build-stamp *.log - # Add here commands to clean up after the build process. -$(MAKE) clean - dh_clean + dh_clean install: build dh_testdir @@ -52,9 +39,8 @@ dh_clean -k dh_installdirs - # Add here commands to install the package into debian/libpst. - $(MAKE) install DESTDIR=$(CURDIR)/debian/libpst - + # Add here commands to install the package into debian/readpst. + dh_install # Build architecture-independent files here. binary-indep: build install @@ -64,27 +50,14 @@ binary-arch: build install dh_testdir dh_testroot -# dh_installdebconf + dh_installchangelogs dh_installdocs - dh_installexamples -# dh_installmenu -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron dh_installman -# dh_installinfo -# dh_undocumented - dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms -# dh_makeshlibs dh_installdeb -# dh_perl dh_shlibdeps dh_gencontrol dh_md5sums --- libpst-0.5.orig/debian/manpages +++ libpst-0.5/debian/manpages @@ -0,0 +1,2 @@ +debian/readpst.1 +debian/readpstlog.1 --- libpst-0.5.orig/debian/install +++ libpst-0.5/debian/install @@ -0,0 +1,2 @@ +readpst usr/bin/ +readpstlog usr/bin/ --- libpst-0.5.orig/debian/watch +++ libpst-0.5/debian/watch @@ -0,0 +1,3 @@ +# Site Pattern Version Script +version=2 +http://dl.sf.net/sourceforge/ol2mbox/ libpst[-_]([^_]*)\.t(ar\.)?gz debian uupdate --- libpst-0.5.orig/debian/readpstlog.1 +++ libpst-0.5/debian/readpstlog.1 @@ -0,0 +1,87 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH READPSTLOG 1 "February 24, 2004" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +readpstlog \- convert a readpst logfile to text format +.SH SYNOPSIS +.B readpstlog +.RI [ options ] " logfile" +.SH DESCRIPTION +This manual page documents briefly the +.B readpstlog +command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBreadpstlog\fP is a program that reads the \fIbinary\fP logfile generated +by \fBreadpst\fP, and outputs it in a more desirable format (i.e. text). +.SH OPTIONS +This program follows the usual GNU command line syntax. +A summary of options is included below. +.TP +.BR \-f " \fIformat\fP" +Sets the format of the text log output. Currently, the only valid output +format is \fBT\fP, for text; anything else gives the default. +.TP +.BR \-t " \fItypes\fP" +Tells \fBreadpstlog\fP to print only the specified types of log messages. +Types are specified in a comma-delimited list (e.g. 3,10,5,6). +.TP +.BR \-x " \fItypes\fP" +Tells \fBreadpstlog\fP to exclude the specified types of log messages. +Types are specified in a comma-delimited list (e.g. 3,10,5,6). +.SH LOG MESSAGE TYPES +.PP +\fBreadpstlog\fP understands the following types of log messages: +.RS 15 +.TP +.B 1 +File accesses +.TP +.B 2 +Index accesses +.TP +.B 3 +New email found +.TP +.B 4 +Warnings +.TP +.B 5 +Read accesses +.TP +.B 6 +Informational messages +.TP +.B 7 +Main function calls +.TP +.B 8 +Decrypting calls +.TP +.B 10 +Function calls +.TP +.B 11 +HexDump calls +.RE +.SH SEE ALSO +.BR readpst (1) +.SH AUTHOR +This manual page was written by Joe Nahmias for the Debian +GNU/Linux system (but may be used by others). --- libpst-0.5.orig/debian/compat +++ libpst-0.5/debian/compat @@ -0,0 +1 @@ +4