Hello community,
here is the log from the commit of package hylafax for openSUSE:Factory checked in at 2014-02-02 07:35:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hylafax (Old)
and /work/SRC/openSUSE:Factory/.hylafax.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hylafax"
Changes:
--------
--- /work/SRC/openSUSE:Factory/hylafax/hylafax.changes 2012-05-22 08:15:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.hylafax.new/hylafax.changes 2014-02-02 07:35:44.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Nov 27 13:06:17 UTC 2013 - axel.braun@gmx.de
+
+- Version 6.0.6:
+ + removed patch for TIFF 4.0
+ + configure.patch adapted
+
+-------------------------------------------------------------------
Old:
----
hylafax-6.0.5-TIFF-4.0.patch
hylafax-6.0.5.tar.gz
New:
----
hylafax-6.0.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hylafax.spec ++++++
--- /var/tmp/diff_new_pack.VyNfCE/_old 2014-02-02 07:35:45.000000000 +0100
+++ /var/tmp/diff_new_pack.VyNfCE/_new 2014-02-02 07:35:45.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package hylafax
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -37,7 +37,7 @@
Requires: smtp_daemon
Requires: tiff
Conflicts: sendfax
-Version: 6.0.5
+Version: 6.0.6
Release: 0
Source: %{name}-%{version}.tar.gz
Source1: latex-cover-1.04.tar.lzma
@@ -56,10 +56,6 @@
Patch10: hylafax-6.0.4-DESTDIR.patch
Patch11: hylafax-6.0.4-configure.patch
Patch12: hylafax-changed_options.patch
-# PATCH-FIX-OPENSUSE hylafax-6.0.5-TIFF-4.0.patch zaitor@opensuse.org -- Fixes build with TIFF 4.0 we now have in 12.2. Patch taken from gentoo ( http://gentoo-overlays.zugaina.org/bgo-overlay/portage/net-misc/hylafax/file... )
-%if 0%{?suse_version} > 1210
-Patch13: hylafax-6.0.5-TIFF-4.0.patch
-%endif
Url: http://www.hylafax.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Very Powerful Fax Server
@@ -96,9 +92,6 @@
%patch10
%patch11
%patch12
-%if 0%{?suse_version} > 1210
-%patch13 -p1
-%endif
# needs to be executable
chmod 755 SuSE/usr/lib/fax/a2pswrap
find ../ -name .cvsignore -exec rm {} \;
++++++ hylafax-6.0.4-configure.patch ++++++
--- /var/tmp/diff_new_pack.VyNfCE/_old 2014-02-02 07:35:45.000000000 +0100
+++ /var/tmp/diff_new_pack.VyNfCE/_new 2014-02-02 07:35:45.000000000 +0100
@@ -140,13 +140,13 @@
{
printf( "header_ver=%d lib_ver=%s", TIFFLIB_VERSION, TIFFGetVersion() );
exit(0);
-@@ -2882,7 +2883,7 @@
+@@ -2904,7 +2905,7 @@
CheckForFunc fchmod && {
echo '#define HAS_FCHMOD 1'
Note "... configure use of fchmod"
- CheckFuncDecl fchmod 'extern int fchmod(int, mode_t);' \
+ CheckFuncDecl fchmod 'extern int fchmod(int, __mode_t) __THROW;' \
- unistd.h libc.h $OSFCNH sys/stat.h
+ unistd.h $OSFCNH sys/stat.h libc.h
}
CheckFuncDecl mknod 'extern int mknod(const char*, mode_t, dev_t);' \
@@ -3259,8 +3260,9 @@
++++++ hylafax-6.0.5.tar.gz -> hylafax-6.0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/VERSION new/hylafax-6.0.6/VERSION
--- old/hylafax-6.0.5/VERSION 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/VERSION 2012-06-06 02:58:38.000000000 +0200
@@ -1 +1 @@
-6.0.5
+6.0.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/configure new/hylafax-6.0.6/configure
--- old/hylafax-6.0.5/configure 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/configure 2012-06-06 02:58:38.000000000 +0200
@@ -2523,13 +2523,18 @@
}
#
-# Check if TIFF library is compatible. If successful,
-# set $tiff_runlen_t on exit to "uint16" or "uint32"
+# Check if TIFF library is compatible, checking:
+# $tiff_runlen_t: "uint16" or "uint32"
+# $tiff_offset_t: "uint32" or "uint64"
+# $tiff_bytecount_t: "uint32" or "uint64"
+# "Classic" structure names
#
CheckLibtiff()
{
Note "... checking TIFF library version"
tiff_runlen_t=""
+ tiff_offset_t=""
+ tiff_bytecount_t=""
cat>t.c<
#include "tiffio.h"
@@ -2550,8 +2555,21 @@
Note " Found libtiff version ${lib_ver}"
if [ ${header_ver} -ge 19960307 ]; then
case ${lib_ver} in
- 3.4) tiff_runlen_t="uint16" ;;
- 3.[56789]) tiff_runlen_t="uint32" ;;
+ 3.4) tiff_runlen_t="uint16"
+ tiff_offset_t="uint32"
+ tiff_bytecount_t="uint32"
+ ;;
+ 3.[56789]) tiff_runlen_t="uint32"
+ tiff_offset_t="uint32"
+ tiff_bytecount_t="uint32"
+ ;;
+ 4.[0]) tiff_runlen_t="uint32"
+ tiff_offset_t="uint64"
+ tiff_bytecount_t="uint64"
+ echo '#define TIFFHeader TIFFHeaderClassic'
+ echo '#define TIFF_VERSION TIFF_VERSION_CLASSIC'
+ echo '#define NEED_TIFFDIRENTRY'
+ ;;
esac
fi
else
@@ -2581,6 +2599,8 @@
fi
if [ "${tiff_runlen_t}" != "" ]; then
export tiff_runlen_t
+ export tiff_offset_t
+ export tiff_bytecount_t
return 0
else
cat 1>&2 </dev/null`" > $FONTMAP_FILE
+ for d in `echo $2 | $SED 's/:/ /g'`; do
+ if [ -d "$d" ]; then
+ cd $d
+ for f in `ls | grep '\.afm'`; do
+ $AWK -F '[ ]' '/FontName/ {print "/"$2"\t("FILENAME")\t;"; exit}; // {}' $f >> $FONTMAP_FILE
+ done
+ fi
+ done
+ }
+ validateFont()
+ {
+ FONTNAME=$1
+ FONTMAP_PATH=$2
+ FONT_PATH=$3
+
+ # Note ""
+ # Note "Searching for a font named $FONTNAME."
+ # Note ""
+
+ ALIAS=$FONTNAME
+ while [ "$ALIAS" != "$LAST_ALIAS" ]; do
+ LAST_ALIAS=$ALIAS
+ for d in `echo $FONTMAP_PATH | $SED 's/:/ /g'`; do
+ if [ -d "$d" ]; then
+ cd $d
+ for f in Fontmap Fontmap.GS Fontmap.HylaFAX; do
+ if [ -f $f ]; then
+ OUTPUT=`$SED -n -e 's/^\/'$ALIAS'[ ]*\((\([^)]*\))\|\/\([^ ;]*\)\).*/\2\3/p' $f`
+ if [ -n "$OUTPUT" ]; then
+ # Allow later files to overwrite previous definitions
+ ALIAS=$OUTPUT
+ fi
+ fi
+ done
+ fi
+ done
+ done
+ FONTFILE=`echo $ALIAS | sed -e 's/\.[^./]*$//'`
+ for d in `echo $FONT_PATH | $SED 's/:/ /g'`; do
+ if [ -f "$d/$FONTFILE.afm" ] || [ -f "$d/$FONTFILE" ]; then
+ echo $FONTNAME
+ return
+ fi
+ done
+ }
+ getDefaultFont()
+ {
+ FONTNAME=$1
+ FONTMAP_PATH=$2
+ FONT_PATH=$3
+
+ FONTNAME=`validateFont $FONTNAME $FONTMAP_PATH $FONT_PATH`
+ if [ -n "$FONTNAME" ]; then
+ echo $FONTNAME
+ return
+ fi
+
+ # Requested font not found, searching for Courier
+ FONTNAME=`validateFont Courier $FONTMAP_PATH $FONT_PATH`
+ if [ -n "$FONTNAME" ]; then
+ echo $FONTNAME
+ return
+ fi
+
+ Note ""
+ Note "Searching for a default font."
+ Note ""
+
+ # Courier font not found, searching for any font, with a
+ # preference for fixed, non-italic, non-bold font.
+ MAX=-1
+ for d in `echo $FONT_PATH | $SED 's/:/ /g'`; do
+ if [ -d "$d" ]; then
+ cd $d
+ for f in `ls | grep '\.afm'`; do
+ VAL=`$AWK -F '[ ]' '
+/^IsFixedPitch / {count++; if (tolower($2) == "true") val += 100}
+/^ItalicAngle / {count++; if ($2 == 0) val += 10}
+/^Weight / {count++; if (tolower($2) == "regular") val += 5;
+ if (tolower($2) == "normal") val += 4;
+ if (tolower($2) == "roman") val += 3;
+ if (tolower($2) == "medium") val += 2;
+ if (tolower($2) == "book") val += 1}
+// {if (count >= 3) exit}
+BEGIN {val = count = 0}
+END {print val}
+' $f`
+ if [ $VAL -gt $MAX ]; then
+ MAX=$VAL
+ FONTNAME=`echo $f | sed -e 's/\.[^./]*$//'`
+ fi
+ done
+ fi
+ done
+ echo $FONTNAME
+ return
+ }
+
+ if [ -f $DIR_LIBDATA/hyla.conf ]; then
+ CONFIGURED_PATH_AFM=`$SED -n -e 's/^FontPath:[ ]*\(.*\)/\1/p' $DIR_LIBDATA/hyla.conf`
+ CONFIGURED_PATH_FONTMAP=`$SED -n -e 's/^FontMap:[ ]*\(.*\)/\1/p' $DIR_LIBDATA/hyla.conf`
+ CONFIGURED_TEXTFONT=`$SED -n -e 's/^TextFont:[ ]*\(.*\)/\1/p' $DIR_LIBDATA/hyla.conf`
+ fi
+
+ if [ -n "$CONFIGURED_TEXTFONT" ]; then
+ FONTNAME=$CONFIGURED_TEXTFONT
+ else
+ FONTNAME=Courier
+ fi
+ if [ -n "$CONFIGURED_PATH_FONTMAP" ]; then
+ FONTMAP_PATH=$CONFIGURED_PATH_FONTMAP
+ else
+ FONTMAP_PATH=$PATH_AFM
+ fi
+ if [ -n "$CONFIGURED_PATH_AFM" ]; then
+ FONT_PATH=$CONFIGURED_PATH_AFM
+ else
+ FONT_PATH=$PATH_AFM
+ fi
+ FOUND_FONTNAME=`getDefaultFont $FONTNAME $FONTMAP_PATH $FONT_PATH`
+ if [ "$FOUND_FONTNAME" != "$FONTNAME" ]; then
+ genFontmap $DIR_LIBDATA/Fontmap.HylaFAX $FONT_PATH
+ FOUND_FONTNAME=`getDefaultFont $FONTNAME $FONTMAP_PATH:$DIR_LIBDATA $FONT_PATH`
+ if [ "$FOUND_FONTNAME" = "$FONTNAME" ]; then
+ # Font was found using our local Fontmap file
+ FONTMAP_PATH=$FONTMAP_PATH:$DIR_LIBDATA
+ else
+ RUNTIME_PATH_AFM=`getGSFonts`
+ if [ -n "$RUNTIME_PATH_AFM" ] && \
+ ( [ "$RUNTIME_PATH_AFM" != "$FONTMAP_PATH" ] || \
+ [ "$RUNTIME_PATH_AFM" != "$FONT_PATH" ] ); then
+
+ FONTMAP_PATH=$RUNTIME_PATH_AFM
+ FONT_PATH=$RUNTIME_PATH_AFM
+ FOUND_FONTNAME=`getDefaultFont $FONTNAME $FONTMAP_PATH $FONT_PATH`
+ if [ "$FOUND_FONTNAME" != "$FONTNAME" ]; then
+ FOUND_FONTNAME=`getDefaultFont $FONTNAME $FONTMAP_PATH:$DIR_LIBDATA $FONT_PATH`
+ if [ -n "$FOUND_FONTNAME" ]; then
+ # Font was found using our local Fontmap file
+ FONTMAP_PATH=$FONTMAP_PATH:$DIR_LIBDATA
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ if [ -n "$FOUND_FONTNAME" ] && [ "$FOUND_FONTNAME" != "$FONTNAME" ]; then
+ # Requested font not found
+ # Setting default font to the best one found
+ FONTNAME=$FOUND_FONTNAME
+ fi
+
+ if [ -n "$FONTNAME" ]; then
+ Note ""
+ Note "Found $FONTNAME to use as default font."
+ Note ""
+ else
Note ""
- Note "Setting Ghostscript font path in $DIR_LIBDATA/hyla.conf."
+ Note "Found no font to use as default font. You will most probably"
+ Note "have to specify a font on textfmt command line."
Note ""
+ fi
+
+ if [ -n "$FONTMAP_PATH" ] && \
+ ( [ "$CONFIGURED_PATH_FONTMAP" != "$FONTMAP_PATH" ] || \
+ [ "$CONFIGURED_PATH_AFM" != "$FONT_PATH" ] || \
+ [ "$CONFIGURED_TEXTFONT" != "$FONTNAME" ] ); then
if [ -f $DIR_LIBDATA/hyla.conf ]; then
- $AWK '!/^FontMap|^FontPath|\/FontPath added by/ { print }' \
+ $AWK '!/^FontMap|^FontPath|^TextFont|\/FontPath added by|^# Font configuration added by/ { print }' \
$DIR_LIBDATA/hyla.conf > $DIR_LIBDATA/hyla.conf.tmp
fi
- echo "# FontMap/FontPath added by faxsetup (`date 2>/dev/null`)" \
+ if [ -n "$FONTMAP_PATH" ] && \
+ ( [ "$PATH_FONTMAP" != "$FONTMAP_PATH" ] || \
+ [ "$PATH_AFM" != "$FONT_PATH" ] || \
+ [ "Courier" != "$FONTNAME" ] ); then
+ Note ""
+ Note "Setting font configuration in $DIR_LIBDATA/hyla.conf."
+ Note ""
+ echo "# Font configuration added by faxsetup (`date 2>/dev/null`)" \
>> $DIR_LIBDATA/hyla.conf.tmp
- echo "FontMap: $RUNTIME_PATH_AFM" >> $DIR_LIBDATA/hyla.conf.tmp
- echo "FontPath: $RUNTIME_PATH_AFM" >> $DIR_LIBDATA/hyla.conf.tmp
+ fi
+
+ if [ -n "$FONTMAP_PATH" ] && [ "$PATH_FONTMAP" != "$FONTMAP_PATH" ]; then
+ echo "FontMap: $FONTMAP_PATH" >> $DIR_LIBDATA/hyla.conf.tmp
+ PATH_FONTMAP=$FONTMAP_PATH
+ fi
+ if [ -n "$FONT_PATH" ] && [ "$PATH_AFM" != "$FONT_PATH" ]; then
+ echo "FontPath: $FONT_PATH" >> $DIR_LIBDATA/hyla.conf.tmp
+ PATH_AFM=$FONT_PATH
+ fi
+ if [ -n "$FONTNAME" ] && [ "Courier" != "$FONTNAME" ]; then
+ echo "TextFont: $FONTNAME" >> $DIR_LIBDATA/hyla.conf.tmp
+ fi
$MV $DIR_LIBDATA/hyla.conf.tmp $DIR_LIBDATA/hyla.conf
- PATH_AFM=$RUNTIME_PATH_AFM
fi
-fi
#
# Installation of Adobe Font Metric files
#
-if onClient; then
- FDIRS=`echo $PATH_AFM | sed "s/:/ /g"`
- MATCH=
- for FDIR in $FDIRS; do
- if [ -d $FDIR ]; then
- cd $FDIR
- if [ -n "`ls | grep '\.afm'`" ] || [ -f Courier ]; then
- MATCH=$FDIR
- break
- fi
- else
- cat >&4 <&4 < retryMAX[callstat])
+ if (!clientInfo.getCalledBefore() && fax.ndials > retryOther)
sendFailed(fax, send_failed, result);
else
- sendFailed(fax, send_retry, result, requeueTTS[callstat]);
+ sendFailed(fax, send_retry, result, requeueOther);
break;
case ClassModem::OK: // call was aborted by user
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/faxd/ModemConfig.c++ new/hylafax-6.0.6/faxd/ModemConfig.c++
--- old/hylafax-6.0.5/faxd/ModemConfig.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/faxd/ModemConfig.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -306,7 +306,7 @@
idConfig.resize(0);
callidIndex = (u_int) -1;
- playList.resize(0);
+ playList.resize(1);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/faxd/choptest.c++ new/hylafax-6.0.6/faxd/choptest.c++
--- old/hylafax-6.0.5/faxd/choptest.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/faxd/choptest.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -120,7 +120,7 @@
uint16 fillorder;
TIFFGetFieldDefaulted(tif, TIFFTAG_FILLORDER, &fillorder);
- uint32* stripbytecount;
+ tiff_bytecount_t* stripbytecount;
(void) TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbytecount);
u_int totbytes = (u_int) stripbytecount[0];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/faxd/cqtest.c++ new/hylafax-6.0.6/faxd/cqtest.c++
--- old/hylafax-6.0.5/faxd/cqtest.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/faxd/cqtest.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -565,7 +565,7 @@
cq.recvSetupTIFF(tifout, 0, cq.recvFillOrder, params);
- uint32* stripbytecount;
+ tiff_bytecount_t* stripbytecount;
(void) TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbytecount);
for (u_int strip = 0; strip < TIFFNumberOfStrips(tif); strip++) {
u_int totbytes = (u_int) stripbytecount[strip];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/faxd/faxQueueApp.c++ new/hylafax-6.0.6/faxd/faxQueueApp.c++
--- old/hylafax-6.0.5/faxd/faxQueueApp.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/faxd/faxQueueApp.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -1039,7 +1039,7 @@
TIFF* tif, const Class2Params& params, fxStr& pagehandling)
{
tstrip_t s = TIFFNumberOfStrips(tif)-1;
- uint32* stripbytecount;
+ tiff_bytecount_t* stripbytecount;
(void) TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbytecount);
u_int stripSize = (u_int) stripbytecount[s];
if (stripSize == 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/faxd/tagtest.c++ new/hylafax-6.0.6/faxd/tagtest.c++
--- old/hylafax-6.0.5/faxd/tagtest.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/faxd/tagtest.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -522,7 +522,7 @@
uint16 fillorder;
TIFFGetFieldDefaulted(tif, TIFFTAG_FILLORDER, &fillorder);
- uint32* stripbytecount;
+ tiff_bytecount_t* stripbytecount;
(void) TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbytecount);
bool firstStrip = setupTagLineSlop(params);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/hfaxd/FileTransfer.c++ new/hylafax-6.0.6/hfaxd/FileTransfer.c++
--- old/hylafax-6.0.5/hfaxd/FileTransfer.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/hfaxd/FileTransfer.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -48,6 +48,21 @@
#endif /* CHAR_BIT */
+#ifdef NEED_TIFFDIRENTRY
+/*
+ * we don't pass these to libtiff anywhere, but HylaFAX uses it to keep track
+ * of the info it has read from the TIFFGetField functions when constructin
+ * and writing a single-directory TIFF FILE read from an existing TIFF fax.
+ */
+typedef struct {
+ uint16 tdir_tag;
+ uint16 tdir_type; /* data type */
+ uint32 tdir_count; /* number of items; length in spec */
+ uint32 tdir_offset; /* byte offset to field data */
+} TIFFDirEntry;
+#endif
+
+
static struct {
const char* name; // protocol token name
bool supported; // true if format is supported
@@ -226,7 +241,7 @@
* amount of image data and then adding in
* the expected data for the TIFF headers.
*/
- uint32* sb;
+ tiff_bytecount_t* sb;
TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &sb);
file_size = sizeof (DirTemplate) +
sizeof (TIFFHeader) + sizeof (uint16);
@@ -441,7 +456,7 @@
bool
HylaFAXServer::sendITIFFData(TIFF* tif, int fdout)
{
- uint32* sb;
+ tiff_bytecount_t* sb;
(void) TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &sb);
tdata_t buf = _TIFFmalloc(sb[0]);
tsize_t bsize = sb[0];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/hfaxd/InetFaxServer.c++ new/hylafax-6.0.6/hfaxd/InetFaxServer.c++
--- old/hylafax-6.0.5/hfaxd/InetFaxServer.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/hfaxd/InetFaxServer.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -207,7 +207,6 @@
bool
InetFaxServer::checkHostIdentity(const char*name)
{
-logDebug("checkHostIdentity(\"%s\")", name);
struct addrinfo hints, *ai;
memset(&hints, 0, sizeof(hints));
@@ -268,7 +267,7 @@
#endif
/* anchor socket to avoid multi-homing problems */
data_source = ctrl_addr;
- Socket::port(data_source) = htons(ntohs(Socket::port(ctrl_addr)-1));
+ Socket::port(data_source) = htons(ntohs(Socket::port(ctrl_addr))-1);
#ifdef F_SETOWN
if (fcntl(fd, F_SETOWN, getpid()) == -1)
logError("fcntl (F_SETOWN): %m");
@@ -559,32 +558,22 @@
bool
InetFaxServer::hostPort()
{
- logDebug("Parsing hostPort(): \"%s\"", (const char*)tokenBody);
-
if (tokenBody[0] == 'E')
{
fxStr s;
if (! STRING(s))
{
- logDebug("Couldn't get string: \"%s\"", (const char*)tokenBody);
syntaxError("EPRT |family|address|port|");
return false;
}
- logDebug("Parsing \"%s\"", (const char*)s);
/*
* Minimual length for EPRT is: 9
* |X|X::|X|
*/
char c = s[0];
- logDebug(" `-> s.length() = %d", s.length());
- logDebug(" `-> s[0] = '%c'", s[0]);
- logDebug(" `-> s[2] = '%c'", s[2]);
- logDebug(" `-> s[%d] = '%c'", s.length()-1, s[s.length()-1]);
if (s.length() > 9
&& c == s[0] && (s[1] == '1' || s[1] == '2') && c == s[2]
&& c == s[s.length()-1]) {
- logDebug("Looks like extended syntax: \"%s\" [%X: %c]", (const char*)s, c&0xFF, c);
-
u_int pos = 3;
fxStr a = s.token(pos, c);
logDebug("`-> Got a: %s[%u]", (const char*)a, pos);
@@ -597,7 +586,6 @@
return false;
}
- logDebug("Parsed: Family %c Address %s Port %s", s[1], (const char*)a, (const char*)p);
struct addrinfo hints, *ai;
memset(&hints, 0, sizeof(hints));
@@ -629,7 +617,6 @@
freeaddrinfo(ai);
return true;
}
- logDebug("Couldn't parse \"%s\"", (const char*)s);
syntaxError("Couldn't parse extended port");
return false;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/hfaxd/SuperServer.c++ new/hylafax-6.0.6/hfaxd/SuperServer.c++
--- old/hylafax-6.0.5/hfaxd/SuperServer.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/hfaxd/SuperServer.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -90,7 +90,6 @@
* with servers started via inetd).
*/
HylaFAXServer* app; app = newChild(); // XXX for __GNUC__
- Dispatcher::instance().unlink(fd);
HylaFAXServer::closeLogging(); // close any open syslog fd
HylaFAXServer::closeAllDispatched();
Sys::close(STDERR_FILENO);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/libhylafax/TextFormat.c++ new/hylafax-6.0.6/libhylafax/TextFormat.c++
--- old/hylafax-6.0.5/libhylafax/TextFormat.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/libhylafax/TextFormat.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -1136,6 +1136,8 @@
fxStr TextFont::fontMap = _PATH_FONTMAP;
fxStr TextFont::fontPath = _PATH_AFM;
u_int TextFont::fontID = 0;
+bool TextFont::fontMapsLoaded = false;
+fxStrDict TextFont::fontMapDict;
TextFont::TextFont(const char* cp) : family(cp)
{
@@ -1145,120 +1147,129 @@
}
TextFont::~TextFont() {}
-bool
-TextFont::decodeFontName(const char* name, fxStr& filename, fxStr& emsg)
+void
+TextFont::error(const char* fmt ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fputs(".\n", stderr);
+}
+
+void
+TextFont::loadFontMap(const char* fontMapFile)
+{
+ FILE* fd = Sys::fopen(fontMapFile, "r");
+
+ if (fd != NULL && fontMapFile[0] == '/') {
+ char buf[1024];
+ while (fgets(buf, sizeof(buf), fd) != NULL) {
+ size_t len = strcspn(buf, "%\n");
+ if (len == strlen(buf)) {
+ error(NLS::TEXT("Warning: %s - line too long."), (const char*)fontMapFile);
+ break;
+ }
+ if (len == 0) continue;
+ if (*buf != '/') continue;
+ *(buf + len) = '\0';
+ char* key = buf + 1;
+ char* tmp = buf + strcspn(buf, ") \t");
+ *tmp++ = '\0';
+ tmp += strspn(tmp, " \t");
+ *(tmp + strcspn(tmp, ") \t;")) = '\0';
+ fxStr val = tmp;
+ if (val[0] == '/') {
+ //alias
+ fontMapDict[key] = val;
+ } else {
+ //real file
+ val.remove(0);
+ fontMapDict[key] = val;
+ }
+ }
+ fclose(fd);
+ }
+}
+
+void
+TextFont::loadFontMaps(void)
{
- struct stat junk;
fxStr path = fontMap;
u_int index = path.next(0, ':');
while (index > 0) {
- /* Newer versions of Ghostscript use "Fontmap.GS"
- * whereas older ones omit the ".GS" extension.
- * If the Fontmap.GS file isn't available default
- * to the older convention.
- */
- filename = path.head(index) | "/" | "Fontmap.GS";
- if (stat(filename, &junk) != 0)
- filename = path.head(index) | "/" | "Fontmap";
- fxStr fontMapFile = filename;
-
- path.remove(0, index);
- if (path.length() > 0) path.remove(0, 1);
- FILE* fd = Sys::fopen(fontMapFile, "r");
- if (fd != NULL && fontMapFile[0] == '/') {
- fxStr key = name;
- char buf[1024];
- int aliascount = maxaliases;
- while (fgets(buf, sizeof(buf), fd) != NULL &&
- aliascount > 0) {
- size_t len = strcspn(buf, "%\n");
- if (len == strlen(buf)) {
- emsg = fxStr::format(
- NLS::TEXT("Warning: %s - line too long."), (const char*)fontMapFile);
- break;
- }
- if (len == 0) continue;
- *(buf + len) = '\0';
- char* tmp = buf + strcspn(buf, ") \t");
- *tmp++ = '\0';
- tmp += strspn(tmp, " \t");
- if (strcmp(key, buf + 1) == 0) {
- //match - now ensure it is the last one in the file
- // for gs compatibility
- *(tmp + strcspn(tmp, ") \t;")) = '\0';
- fxStr val = tmp;
- while (fgets(buf, sizeof(buf), fd) != NULL) {
- len = strcspn(buf, "%\n");
- if (len == strlen(buf)) {
- emsg = fxStr::format(
- NLS::TEXT("Warning: %s - line too long."), (const char*) fontMapFile);
- break;
- }
- if (len == 0) continue;
- *(buf + len) = '\0';
- tmp = buf + strcspn(buf, ") \t");
- *tmp++ = '\0';
- tmp += strspn(tmp, " \t");
- if (strcmp(key, buf + 1) == 0) {
- *(tmp + strcspn(tmp, ") \t;")) = '\0';
- val = tmp;
- }
- }
- if (val[0] == '/') {
- //alias
- aliascount--;
- val.remove(0);
- key = val;
- fseek(fd, 0L, SEEK_SET);
- } else {
- //real file
- fclose(fd);
- val.remove(0);
- int pos = val.next(0, '.');
- val.remove(pos, val.length() - pos);
- val.append(".afm");
- //move through dirs looking for font
- fxStr fpath = fontPath;
- int index2 = fpath.next(0, ':');
- filename = fpath.head(index2) | "/" | val;
- fpath.remove(0, index2);
- if (fpath.length() > 0) fpath.remove(0, 1);
- while (stat(filename, &junk) != 0 && index2 > 0) {
- index2 = fpath.next(0, ':');
- filename = fpath.head(index2) | "/" | val;
- fpath.remove(0, index2);
- if (fpath.length() > 0) fpath.remove(0, 1);
- }
- bool result = stat(filename, &junk) ? false : true;
- if (!result)
- emsg = fxStr::format(
- NLS::TEXT("Warning: %s invalid Fontmap entry - no filename present"), (const char*)val);
- return result;
- }
- }
- }
- fclose(fd);
- }
- index = path.next(0, ':');
+ /* Newer versions of Ghostscript use "Fontmap.GS"
+ * whereas older ones omit the ".GS" extension.
+ * If the Fontmap.GS file isn't available default
+ * to the older convention. faxsetup may also generate
+ * a Fontmap.HylaFAX file if the Ghostscript files
+ * are not found or incomplete at setup time.
+ */
+ loadFontMap(path.head(index) | "/" | "Fontmap");
+ loadFontMap(path.head(index) | "/" | "Fontmap.GS");
+ loadFontMap(path.head(index) | "/" | "Fontmap.HylaFAX");
+
+ path.remove(0, index);
+ if (path.length() > 0) path.remove(0, 1);
+ index = path.next(0, ':');
+ }
+ TextFont::fontMapsLoaded = true;
+}
+
+bool
+TextFont::findAFMFile(const char* name, fxStr& filename, fxStr& emsg, bool noExtension)
+{
+ struct stat junk;
+ fxStr val = name;
+ int pos = val.next(0, '.');
+ val.remove(pos, val.length() - pos);
+ val.append(".afm");
+ //move through dirs looking for font
+ fxStr fpath = fontPath;
+ u_int index = fpath.next(0, ':');
+ if (index == 0) {
+ emsg = NLS::TEXT("Empty FontPath, no possibility to find font file");
+ return false;
}
- //decoding using fontmap has failed
- //now try plain filename with/without afm extension
- path = fontPath;
- index = path.next(0, ':');
while (index > 0) {
- filename = path.head(index) | "/" | name | ".afm";
- path.remove(0, index);
- if (path.length() > 0) path.remove(0, 1);
- if (stat(filename, &junk) == 0) return true;
- filename.resize(filename.length()-4); // strip ``.afm''
- if (stat(filename, &junk) == 0) return true;
- index = path.next(0, ':');
+ filename = fpath.head(index) | "/" | val;
+ fpath.remove(0, index);
+ if (fpath.length() > 0) fpath.remove(0, 1);
+ if (stat(filename, &junk) == 0) return true;
+ if (noExtension) {
+ filename.resize(filename.length()-4); // strip ``.afm''
+ if (stat(filename, &junk) == 0) return true;
+ }
+ index = fpath.next(0, ':');
}
+ emsg = fxStr::format(NLS::TEXT("Font metrics file not found: %s"), (const char *)val);
return false;
}
bool
+TextFont::decodeFontName(const char* name, fxStr& filename, fxStr& emsg)
+{
+ fxStr key = name;
+ int aliascount = maxaliases;
+
+ if (!TextFont::fontMapsLoaded);
+ loadFontMaps();
+ while (((const char*)fontMapDict[key])[0] == '/' && aliascount-- > 0) {
+ // Alias
+ key = fontMapDict[key];
+ key.remove(0);
+ }
+
+ if (aliascount >= 0 && fontMapDict.find(key))
+ return findAFMFile(fontMapDict[key], filename, emsg);
+
+ //decoding using fontmap has failed
+ //now try plain filename with/without afm extension
+ return findAFMFile(name, filename, emsg, true);
+}
+
+bool
TextFont::findFont(const char* name)
{
fxStr myname, emsg;
@@ -1361,7 +1372,7 @@
fxStr emsg;
if (!decodeFontName(family, fontpath, emsg)) {
fprintf(stderr,emsg);
- return NULL;
+ return NULL;
}
return Sys::fopen(fontpath, "r");
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/libhylafax/TextFormat.h new/hylafax-6.0.6/libhylafax/TextFormat.h
--- old/hylafax-6.0.5/libhylafax/TextFormat.h 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/libhylafax/TextFormat.h 2012-06-06 02:58:38.000000000 +0200
@@ -29,6 +29,7 @@
* Simple Text To PostScript Conversion Support.
*/
#include "Str.h"
+#include "StrDict.h"
#include "FaxConfig.h"
typedef long TextCoord; // local coordinates
@@ -41,16 +42,26 @@
fxStr showproc; // PostScript show procedure
TextCoord widths[256]; // width table
- static fxStr fontMap; // location of Fontmap file
- static fxStr fontPath; // path for afm files
- static u_int fontID; // font identifier number
+ static fxStr fontMap; // location of Fontmap file
+ static fxStr fontPath; // path for afm files
+ static u_int fontID; // font identifier number
+ static fxStrDict fontMapDict; // Font maps dictionary
+ static bool fontMapsLoaded; // Font maps have been loaded in memory
friend class TextFormat;
void loadFixedMetrics(TextCoord w);
FILE* openAFMFile(fxStr& pathname);
bool getAFMLine(FILE* fp, char* buf, int bsize);
+
+ static void error(const char* fmt ...);
+
+ static void loadFontMap(const char* fontMapFile);
+ static void loadFontMaps(void);
static bool decodeFontName(const char*, fxStr&, fxStr&);
+ static bool findAFMFile(const char* name, fxStr& filename, fxStr& emsg,
+ bool noExtension = false);
+
public:
TextFont(const char*);
~TextFont();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/libhylafax/TypeRules.c++ new/hylafax-6.0.6/libhylafax/TypeRules.c++
--- old/hylafax-6.0.5/libhylafax/TypeRules.c++ 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/libhylafax/TypeRules.c++ 2012-06-06 02:58:38.000000000 +0200
@@ -66,7 +66,7 @@
}
static const char* typeNames[] =
- { "ascii", "asciiesc", "string", "istring" "address", "byte", "short", "long" };
+ { "ascii", "asciiesc", "string", "istring", "address", "byte", "short", "long" };
static const char* opNames[] =
{ "<any>", "=", "!=", "<", "<=", ">", ">=", "&", "^", "!" };
static const char* resultNames[] = { "tiff", "postscript", "pdf", "pcl", "error" };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/man/hylafax-config.4f new/hylafax-6.0.6/man/hylafax-config.4f
--- old/hylafax-6.0.5/man/hylafax-config.4f 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/man/hylafax-config.4f 2012-06-06 02:58:38.000000000 +0200
@@ -150,6 +150,7 @@
JobControlCmd\(S1 string \- job control command
JobReqBusy integer \s-1180\s+1 requeue interval for \s-1BUSY\s+1 dial result
JobReqDataConn integer \s-1300\s+1 requeue interval for data connection dial result
+JobReqError integer \s-1300\s+1 requeue interval for \s-1ERROR\s+1 dial result
JobReqNoAnswer integer \s-1300\s+1 requeue interval for \s-1NO ANSWER\s+1 dial result
JobReqNoCarrier integer \s-1300\s+1 requeue interval for \s-1NO CARRIER\s+1 dial result
JobReqNoFCon integer \s-1300\s+1 requeue interval for carrier without \s-1+FCON\s+1 dial result
@@ -157,6 +158,7 @@
JobReqProto integer \s-160\s+1 requeue interval after fax protocol error
JobRetryBusy integer \- number of retries for \s-1BUSY\s+1 dial result
JobRetryDataConn integer \- number of retries for data connection dial result
+JobRetryError integer \- number of retries for \s-1ERROR\s+1 dial result
JobRetryNoAnswer integer \- number of retries for \s-1NO ANSWER\s+1 dial result
JobRetryNoCarrier integer 1 number of retries for \s-1NO CARRIER\s+1 dial result
JobRetryOther integer \- number of retries for ``other'' problems
@@ -956,6 +958,10 @@
The delay in seconds to wait before retrying a facsimile job whose
dialing attempt failed because a data modem answered the phone.
.TP
+.B JobReqError
+The delay in seconds to wait before retrying a job whose
+dialing attempt failed with a ``\s-1ERROR\s+1'' status result.
+.TP
.B JobReqNoAnswer
The delay in seconds to wait before retrying a job whose
dialing attempt failed with a ``\s-1NO ANSWER\s+1'' status result.
@@ -990,6 +996,11 @@
dialing attempt failed because a data modem answered the phone when
the number has not been successfully dialed before.
.TP
+.B JobRetryError
+The number of times to redial a phone number after receiving
+a ``\s-1ERROR\s+1'' result code when the number has not
+been successfully dialed before.
+.TP
.B JobRetryNoAnswer
The number of times to redial a phone number after the
dialing attempt failed because of NO ANSWER when
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/man/notify.1m new/hylafax-6.0.6/man/notify.1m
--- old/hylafax-6.0.5/man/notify.1m 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/man/notify.1m 2012-06-06 02:58:38.000000000 +0200
@@ -128,6 +128,12 @@
whitespace. In that case a separate attachment is created
for each filetype.
.TP
+.I TEMPLATE
+the template subdirectory to use when sending e-mails. HylaFAX ships with
+a base set of templates, and some direct translations. To use the German
+translated templates, set TEMPLATE=de in FaxNotify. This is relative to the
+base template directory.
+.TP
.I NOTIFY_FAXMASTER
is used to deliver a notification message to
.B TOADDR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hylafax-6.0.5/rpm/hylafax.spec new/hylafax-6.0.6/rpm/hylafax.spec
--- old/hylafax-6.0.5/rpm/hylafax.spec 2010-09-15 16:42:36.000000000 +0200
+++ new/hylafax-6.0.6/rpm/hylafax.spec 2012-06-06 02:58:38.000000000 +0200
@@ -1,5 +1,5 @@
%define name hylafax
-%define version 6.0.4
+%define version 6.0.5
%define pkg_release 1
#
@@ -455,6 +455,9 @@
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/hylafax/typerules
%changelog
+* Mon Oct 11 2010 Patrice Fournier 6.0.5-1
+ - Update to official 6.0.5 release
+
* Fri Dec 18 2009 Patrice Fournier 6.0.4-0.rc2
- Update package to 6.0.4-rc2 release-candidate
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org