rpms/dvipdfm/devel dvipdfm-0.13.2d-dvipdft-security.patch, NONE, 1.1 dvipdfm-0.13.2d-security.patch, NONE, 1.1 dvipdfm-0.13.2d-texlive2007.patch, NONE, 1.1 dvipdfm-config, NONE, 1.1 dvipdfm.spec, NONE, 1.1 dvipdft, NONE, 1.1 dvipdft.1, NONE, 1.1 ebb.1, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Jonathan G. Underwood (jgu) fedora-extras-commits at redhat.com
Sun May 11 00:31:14 UTC 2008


Author: jgu

Update of /cvs/extras/rpms/dvipdfm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31800/devel

Modified Files:
	.cvsignore sources 
Added Files:
	dvipdfm-0.13.2d-dvipdft-security.patch 
	dvipdfm-0.13.2d-security.patch 
	dvipdfm-0.13.2d-texlive2007.patch dvipdfm-config dvipdfm.spec 
	dvipdft dvipdft.1 ebb.1 
Log Message:
Initial check in of package.


dvipdfm-0.13.2d-dvipdft-security.patch:

--- NEW FILE dvipdfm-0.13.2d-dvipdft-security.patch ---
--- dvipdfm/dvipdft.badscript	2006-05-24 16:48:16.000000000 -0700
+++ dvipdfm/dvipdft	2006-05-24 16:51:53.000000000 -0700
@@ -31,7 +31,7 @@
        $progname --help
        $progname --version"
 
-tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
+tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX`
 
 quoteit()
 {

dvipdfm-0.13.2d-security.patch:

--- NEW FILE dvipdfm-0.13.2d-security.patch ---
--- tetex-src-2.0.2/texk/dvipdfm/psimage.c.dvipdfm-security	2001-06-28 20:55:26.000000000 +0100
+++ tetex-src-2.0.2/texk/dvipdfm/psimage.c	2003-03-12 18:12:56.000000000 +0000
@@ -113,10 +113,15 @@
 {
 #ifdef HAVE_SYSTEM
   pdf_obj *result = NULL;
-  char *tmp, *cmd;
+  char tmp[] = "/tmp/dvipdfm.XXXXXX", *cmd;
+  int tfd;
   FILE *pdf_file = NULL;
   /* Get a full qualified tmp name */
-  tmp = tmpnam (NULL);
+  tfd = mkstemp (tmp);
+  if (tfd == -1) {
+    fprintf (stderr, "\nCouldn't create temporary file for output\n");
+    return NULL;
+  } else close (tfd);
   if ((cmd = build_command_line (file_name, tmp))) {
     if (!system (cmd) && (pdf_file = MFOPEN (tmp, FOPEN_RBIN_MODE))) {
       result = pdf_include_page (pdf_file, p, res_name);

dvipdfm-0.13.2d-texlive2007.patch:

--- NEW FILE dvipdfm-0.13.2d-texlive2007.patch ---
diff -rud dvipdfm-0.13.2d/ebb.c dvipdfm-tl2007/ebb.c
--- dvipdfm-0.13.2d/ebb.c	2001-06-28 20:55:26.000000000 +0100
+++ dvipdfm-tl2007/ebb.c	2008-04-12 14:44:38.000000000 +0100
@@ -49,7 +49,7 @@
   fprintf (stderr, "ebb comes with ABSOLUTELY NO WARRANTY.\n");
   fprintf (stderr, "This is free software, and you are welcome to redistribute it\n");
   fprintf (stderr, "under certain conditions.  Details are distributed with the software.\n");
-  fprintf (stderr, "\nUsage: [-v] [-b] ebb [files]\n");
+  fprintf (stderr, "\nUsage: ebb [-v] [-b] [files]\n");
   fprintf (stderr, "\t-b\t\tWrite .bb file in binary mode\n");
   fprintf (stderr, "\t-v\t\tVerbose\n");
   exit(1);

diff -rud dvipdfm-0.13.2d/pdfdev.c dvipdfm-tl2007/pdfdev.c
--- dvipdfm-0.13.2d/pdfdev.c	2007-03-03 01:46:06.000000000 +0000
+++ dvipdfm-tl2007/pdfdev.c	2008-04-12 14:44:38.000000000 +0100
@@ -165,7 +165,7 @@
 #define PK 2
 #define TRUETYPE 3
 
-#define DEFAULT_MAP_FILE "fonts.map"
+#define DEFAULT_MAP_FILE "dvipdfm.map"
 
 static struct dev_font {
   char short_name[7];	/* Needs to be big enough to hold name "Fxxx"

diff -rud dvipdfm-0.13.2d/pngimage.c dvipdfm-tl2007/pngimage.c
--- dvipdfm-0.13.2d/pngimage.c	2001-06-28 20:55:26.000000000 +0100
+++ dvipdfm-tl2007/pngimage.c	2008-04-12 14:44:38.000000000 +0100
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <kpathsea/config.h>
 #include <kpathsea/c-ctype.h>
 #include "system.h"
 #include "config.h"

diff -rud dvipdfm-0.13.2d/system.h dvipdfm-tl2007/system.h
--- dvipdfm-0.13.2d/system.h	2001-06-28 20:55:26.000000000 +0100
+++ dvipdfm-tl2007/system.h	2008-04-12 14:44:38.000000000 +0100
@@ -12,6 +12,7 @@
 #  undef CMYK
 #  undef SETLINEJOIN
 #  undef SETMITERLIMIT
+#  undef SETLINECAP
 #  pragma warning(disable : 4101 4018)
 #else
 #  define __cdecl

diff -rud dvipdfm-0.13.2d/thumbnail.c dvipdfm-tl2007/thumbnail.c
--- dvipdfm-0.13.2d/thumbnail.c	2001-06-28 20:55:27.000000000 +0100
+++ dvipdfm-tl2007/thumbnail.c	2008-04-12 14:44:38.000000000 +0100
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <kpathsea/config.h>
 #include <kpathsea/c-ctype.h>
 #include "system.h"
 #include "config.h"
@@ -42,8 +43,9 @@
 {
   /* Build path name for anticipated thumbnail image */
   char *tmpdir, *tmpname;
-  if (!(tmpdir = getenv ("TMP")) &&
-      !(tmpdir = getenv ("TEMP"))) 
+  if (!(tmpdir = getenv ("TMPDIR")) &&
+      !(tmpdir = getenv ("TEMP")) &&
+      !(tmpdir = getenv ("TMP"))) 
     tmpdir = TMP;
   tmpname = NEW (strlen(tmpdir)+strlen(thumb_filename)+strlen(DIR_SEP_STRING)+1,
 		 char);


--- NEW FILE dvipdfm-config ---
% config file for dvipdfm, prepared for teTeX by Thomas Esser.
% For more info, read the dvipdfm manual (texdoc dvipdfm) and
% the original file which is provided as README.config.

% Distiller config. Uses ghostscript and works on compressed and
% uncompressed files.
D "zcat -f %i | gs -q -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=1.2 -dUseFlateCompression=true -dSAFER -sOutputFile=%o - -c quit"

% Set default paper size here
p a4

% The "g" option specifies the amount to "grow" annotations by
% Many TeX macro pages set the annotation bounding box equal
% to the TeX box that encloses the material.  That's not always
% what you want
g 1

% PDF version stamp to use in output file and max version of files
% allowed to be included (2 for 1.2, 3 for 1.3)
V 2

% For correct searching / text extraction:
f cm-dvipdfm-fix.map

% Font map files; maintained by updmap(1)
f dvipdfm.map


--- NEW FILE dvipdfm.spec ---
# This macros need to match what is in the texlive-texmf package. Here
# we define it in case it's not set.
%{!?_texmf_main: %define _texmf_main %{_datadir}/texmf}

Name:           dvipdfm
Version:        0.13.2d
Release:        38%{?dist}
Summary:        A DVI to PDF translator

Group:          Applications/Publishing
License:        GPLv2+
URL:            http://gaspra.kettering.edu/dvipdfm/
Source0:        http://gaspra.kettering.edu/dvipdfm/%{name}-%{version}.tar.gz

# The following sources are taken from the TeXLive 2007 modified version of dvipdfm
Source1:        dvipdft
Source2:        dvipdft.1
Source3:        ebb.1
Source4:        dvipdfm-config

# These two fix up security issues associated with predicatble temp files
Patch0:         dvipdfm-0.13.2d-security.patch
Patch1:         dvipdfm-0.13.2d-dvipdft-security.patch

# The following patch contains miscellaneous fixes taken from the TeXLive 2007 sources
Patch2:         dvipdfm-0.13.2d-texlive2007.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  zlib-devel kpathsea-devel 
BuildRequires:  tex(tex)

Requires:       ghostscript tex(dvips) tex(tex)
Requires(post): /usr/bin/mktexlsr
Requires(postun): /usr/bin/mktexlsr

%description
DVIPDFM is a DVI to PDF translator developed by Mark A. Wicks.

%prep
%setup -q -n %{name}
rm dvipdft
mv config config.original
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
mv dvipdfm-config config

%patch0 -p3 -b .security
%patch1 -p1 -b .dvipdft-security
%patch2 -p1 -b .texlive2007

# Add extra man pages to Makefile.in to ensure they're installed
sed -i -e 's/manpages=dvipdfm.1/manpages=dvipdfm.1 dvipdft.1 ebb.1/' Makefile.in

# Ensure manpages are utf-8
for i in dvipdft.1 ebb.1 ; do
    iconv -f ISO-8859-1 -t UTF8 $i > $i.utf8 && touch -r $i $i.utf8 && mv $i.utf8 $i
done

%build
%configure
make %{?_smp_mflags}

pushd doc
tex dvipdfm
../dvipdfm dvipdfm
popd

%install
rm -rf $RPM_BUILD_ROOT

# Makefile doesn't respect DESTDIR, so we have to use this hack
%makeinstall INSTALL='install -p'

%clean
rm -rf $RPM_BUILD_ROOT

%post
/usr/bin/mktexlsr > /dev/null 2>&1 || :

%postun
/usr/bin/mktexlsr > /dev/null 2>&1 || :

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING Credits README NEWS  latex-support config.original
%doc doc/dvipdfm.dvi doc/dvipdfm.pdf
%{_bindir}/ebb
%{_bindir}/dvipdfm
%{_bindir}/dvipdft
%{_texmf_main}/dvipdfm/base
%{_texmf_main}/dvipdfm/config
%{_mandir}/man1/dvipdfm.1*
%{_mandir}/man1/dvipdft.1*
%{_mandir}/man1/ebb.1*

%changelog
* Sun Apr 27 2008 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 0.13.2d-38
- Untabify spec file
- Ensure dvipdft is not executeable in SRPM
- Ensure man pages are UTF-8
- Fix comment about tex(tex) 

* Sat Apr 26 2008 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 0.13.2d-37
- Fix comment about texlive-texmf [tex(tex)] BuildRequires
- Rename config file tp dvipdfm-config in SRPM
- Add INSTALL='install -p' to makeinstall
- Run mktexlsr on install

* Sun Apr 14 2008 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 0.13.2d-36
- Fix URL
- Cherry pick changes made by TeXLive 2007
- Build dvi and pdf docs
- Add Requires for tex(tex)
- Add security fix patches for temp file creation

* Sat Mar  8 2008 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 0.13.2d-35
- Initial separate package - formerly part of texlive



--- NEW FILE dvipdft ---
#!/bin/sh

#
# dvipdft, completely rewtitten by Thomas Esser for teTeX after an
# original script by Mark A. Wicks
#
# Thomas Esser. Public Domain.
#

# This script makes a first (fast) run with dvipdfm, then calls gs on
# the resulting pdf file to get the thumbnails and finally calls dvipdfm.

test -f /bin/sh5 && test -z "$RUNNING_SH5" \
  && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
  && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; }
unset RUNNING_SH5

test -f /bin/bsh && test -z "$RUNNING_BSH" \
  && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
  && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
unset RUNNING_BSH

# hack around a bug in zsh:
test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'

progname=dvipdft
version=1111942378 # seconds since `00:00:00 1970-01-01 UTC'
                    # date '+%s' (with GNU date)

help="Usage: $progname [options] dvifile
       $progname --help
       $progname --version"

tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$

quoteit()
{
  echo "x$1" | sed "s at .@@; s@'@'\\\\''@; s@^@'@; s@\$@'@"
}

# process args 1 to (n-1) and scan for a -o argument keep a properly
# quoted backup of the options, so that they can be restored later
unset s outfile
while test $# -gt 1; do
  case $1 in
    -o) outfile=$2;;
  esac
  s="$s${s+ }"`quoteit "$1"`
  shift
done

# check for last argument
case $1 in
  --help)
    echo "$help"
    exit 0
    ;;
  --version)
    echo "$progname version $version by Thomas Esser"
    exit 0
    ;;
  "")
    echo "$help"
    exit 1
    ;;
esac

# args 1 to (n-1) are gone, last one must be the dvifile
dvifile=$1

# outfile comes from -o argument, else it is derived from the input file
test -n "$outfile" \
  || outfile=`echo "$dvifile" | sed 's at .*/@@; s@\.dvi$@@; s@$@.pdf@'`

# outBase is part of the thumbname files just as dvipdfm expects them:
outBase=`echo "$outfile" | sed 's@\.pdf$@@'`

# restore args 1 to (n-1):
eval set x "$s"; shift

# Run dvipdfm with the fastest options for the first pass
echo "$progname: running dvipdfm $@ -e -z0 $dvifile" >&2
dvipdfm ${1+"$@"} -e -z0 "$dvifile" || {
  echo "$progname: dvipdfm failed." >&2
  exit 1
}

# before we create the tmpdir, set trap for cleanup
trap '
  rm -rf $tmpdir
  exit 1
' 1 2 3 7 13 15

mkdir "$tmpdir" || {
  echo "$progname: failed to create temp directory." >&2
  exit 1
}

# if outBase contains a /, we might need to create a directory
case $outBase in
  */*)
    fq=`echo "$tmpdir/$outBase" | sed 's@//@/@g; s@/[^/]*$@@'`
    test -d "$fq" || mkdir -p "$fq" || {
      echo "$progname: failed to create temp thumbnail directory." >&2
      rm -rf $tmpdir
      exit 1
    }
    ;;
esac

# run gs
echo "$progname: running gs" >&2
gs -r10 -dNOPAUSE -dBATCH -sDEVICE=png256 \
   -sOutputFile="$tmpdir/$outBase.%d" "$outfile" || {
  echo "$progname: gs failed." >&2
  rm -rf $tmpdir
  exit 1
}

# run dvipdfm with the users specified options for the last pass
echo "$progname: running dvipdfm -dt $@ $dvifile" >&2
TMP=$tmpdir dvipdfm -dt ${1+"$@"} "$dvifile" || {
  echo "$progname: dvipdfm failed." >&2
  rm -rf $tmpdir
  exit 1
}

# nothing failed, so cleanup and report success to caller
rm -rf $tmpdir
exit 0


--- NEW FILE dvipdft.1 ---
.TH "dvipdft" "1" "May 2004" "teTeX" "teTeX" 
.PP 
.SH "NAME" 
dvipdft \- create thumbnail images for use with dvipdfm
.PP 
.SH "SYNOPSIS" 
.PP 
\fBdvipdft\fP  [ \fI DVIPDFM-OPTIONS\fP \&.\&.\&.  ] \fI filename.dvi\fP
.PP 
.SH "DESCRIPTION" 
.PP 
\fBdvipdft\fP creates thumbnail pictures of the pages in your file
and subsequently runs dvipdfm to create a PDF file with these
thumbnails. 
.PP
.SH "OPTIONS" 
.HP
All options are simply handed on to dvipdfm
.HP
.SH "SEE ALSO" 
.IP 
\fBdvipdfm\fP(1)
.PP 
.SH "BUGS" 
.PP 
None known\&.
.PP 
.SH "AUTHOR" 
.PP 
\fBdvipdft\fP was written by Mark A. Wicks and Thomas Esser.
.PP 
This manual page was written by Frank Küster <frank at kuesterei\&.ch>,
for the Debian GNU/Linux system\&.  It may be used by others without
contacting the author\&.  Any mistakes or omissions in the manual page
are my fault; inquiries about or corrections to this manual page
should be directed to me (and not to the primary author)\&.


--- NEW FILE ebb.1 ---
.TH "ebb" "1" "May 2004" "teTeX" "teTeX" 
.PP 
.SH "NAME" 
ebb \- extract a bounding box from JPEG, PNG, and PDF files
.PP 
.SH "SYNOPSIS" 
.PP 
\fBebb\fP  [ \fI -v\fP | \fI-b\fP  ] \fI graphic_file\fP
.PP 
.SH "DESCRIPTION" 
.PP 
\fBebb\fP extracts the bounding box from JPEG, PNG, and PDF files
(with lower- or uppercase extensions) and writes it into a file with
the extension \fB.bb\fP, together with some header information. These
files can then be used by \fBdvipdfm\fP or other programs.
.PP
.SH "OPTIONS" 
.HP
\fB\-v\fR : be verbose
.HP
\fB\-b\fR : Write .bb file in binary mode (has no effect on Linux and
other systems conforming to POSIX).
.HP
.PP 
.SH "AUTHOR" 
.PP 
\fBebb\fP was written by Mark A. Wicks.
.PP 
This manual page was written by Frank Küster <frank at kuesterei\&.ch>,
for the Debian GNU/Linux system\&.  It may be used and modified by
others without contacting the author\&.  Any mistakes or omissions in
the manual page are my fault; inquiries about or corrections to this
manual page should be directed to me (and not to the primary
author)\&.


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/dvipdfm/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	29 Apr 2008 15:20:36 -0000	1.1
+++ .cvsignore	11 May 2008 00:30:38 -0000	1.2
@@ -0,0 +1 @@
+dvipdfm-0.13.2d.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/dvipdfm/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	29 Apr 2008 15:20:36 -0000	1.1
+++ sources	11 May 2008 00:30:38 -0000	1.2
@@ -0,0 +1 @@
+9d450a964511e4bd68051e793037d8d9  dvipdfm-0.13.2d.tar.gz




More information about the scm-commits mailing list