another quoted variable fixes for spaces in filenames, use SGML_INCLUDE in man backend(upstream), change upstream URL to something useful, escape dots and single quotes in column 1 in docbook2man-spec.pl

This commit is contained in:
Ondrej Vasik 2009-07-24 13:30:48 +00:00
parent d0b6f0cae5
commit b8226c9ba8
4 changed files with 72 additions and 2 deletions

View File

@ -190,6 +190,15 @@
fi
--- Original/bin/jw.in 2003-04-30 18:21:49.000000000 +0200
+++ Changes/bin/jw.in 2007-05-21 14:28:58.000000000 +0200
@@ -246,7 +246,7 @@ then
echo -e $SGML_HELP_MESSAGE >&2
exit 1
fi
-if [ ! -s $SGML_FRONTEND ]
+if [ ! -s "$SGML_FRONTEND" ]
then
echo "`basename $0`: There is no frontend called \"$SGML_FRONTEND\"." >&2
exit 2
@@ -270,14 +270,14 @@
echo -e $SGML_HELP_MESSAGE >&2
exit 1
@ -225,3 +234,27 @@
fi
SGML_RETURN=$?
cd "$SGML_CURRENT_DIRECTORY"
diff -urNp docbook-utils-0.6.14-orig/backends/man.in docbook-utils-0.6.14/backends/man.in
--- docbook-utils-0.6.14-orig/backends/man.in 2003-02-11 13:56:23.000000000 +0100
+++ docbook-utils-0.6.14/backends/man.in 2009-07-24 15:07:04.000000000 +0200
@@ -7,7 +7,7 @@ HELPER=$SGML_BASE_DIR/docbook/utils-@VER
TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
{ echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
trap 'rm -rf "${TMPDIR}"' EXIT
-nsgmls $SGML_FILE > "${TMPDIR}/nsgmls.tmp"
+nsgmls "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp"
sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
if [ $? -ne 0 ]
then
diff -urNp docbook-utils-0.6.14-orig/backends/texi.in docbook-utils-0.6.14/backends/texi.in
--- docbook-utils-0.6.14-orig/backends/texi.in 2002-08-05 23:20:56.000000000 +0200
+++ docbook-utils-0.6.14/backends/texi.in 2009-07-24 15:08:02.000000000 +0200
@@ -3,7 +3,7 @@
# This program is under GPL license. See LICENSE file for details.
# Convert to texinfo
-nsgmls $SGML_FILE | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
+nsgmls "$SGML_FILE" | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
if [ $? -ne 0 ]
then exit 1
fi

View File

@ -0,0 +1,24 @@
diff -urNp docbook-utils-0.6.14-orig/backends/man.in docbook-utils-0.6.14/backends/man.in
--- docbook-utils-0.6.14-orig/backends/man.in 2009-07-24 15:17:42.000000000 +0200
+++ docbook-utils-0.6.14/backends/man.in 2009-07-24 15:20:57.000000000 +0200
@@ -7,7 +7,7 @@ HELPER=$SGML_BASE_DIR/docbook/utils-@VER
TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
{ echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
trap 'rm -rf "${TMPDIR}"' EXIT
-nsgmls "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp"
+nsgmls "$SGML_INCLUDE" "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp"
sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
if [ $? -ne 0 ]
then
diff -urNp docbook-utils-0.6.14-orig/bin/jw.in docbook-utils-0.6.14/bin/jw.in
--- docbook-utils-0.6.14-orig/bin/jw.in 2009-07-24 15:17:42.000000000 +0200
+++ docbook-utils-0.6.14/bin/jw.in 2009-07-24 15:18:51.000000000 +0200
@@ -423,7 +423,7 @@ echo "Using catalogs: `echo $SGML_CATALO
echo "Using stylesheet: $SGML_STYLESHEET"
echo "Working on: $SGML_FILE"
cd "$SGML_OUTPUT_DIRECTORY"
-export SGML_JADE SGML_FILE_NAME SGML_ARGUMENTS
+export SGML_JADE SGML_FILE_NAME SGML_ARGUMENTS SGML_INCLUDE
export SGML_CATALOG_FILES SGML_BASE_DIR SGML_FILE SGML_STYLESHEET
NOCHUNKS=`echo $SGML_OPTIONS | grep nochunks`
if [ -z "$NOCHUNKS" ]

View File

@ -1,10 +1,10 @@
Name: docbook-utils
Version: 0.6.14
Release: 17%{?dist}
Release: 18%{?dist}
Group: Applications/Text
Summary: Shell scripts for managing DocBook documents
URL: ftp://sources.redhat.com/pub/docbook-tools/new-trials/
URL: http://sources.redhat.com/docbook-tools/
License: GPLv2+
@ -32,6 +32,7 @@ Patch0: docbook-utils-spaces.patch
Patch1: docbook-utils-2ndspaces.patch
Patch2: docbook-utils-w3mtxtconvert.patch
Patch3: docbook-utils-grepnocolors.patch
Patch4: docbook-utils-sgmlinclude.patch
%description
This package contains scripts are for easy conversion from DocBook
@ -59,6 +60,7 @@ PDF format.
%patch1 -p1 -b .2ndspaces
%patch2 -p1 -b .w3mtxtconvert
%patch3 -p1 -b .grepnocolors
%patch4 -p1 -b .sgmlinclude
%build
./configure --prefix=%{_prefix} --mandir=%{_mandir} --libdir=%{_libdir}
@ -126,6 +128,12 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*/docbook2ps.*
%changelog
* Fri Jul 24 2009 Ondrej Vasik <ovasik@redhat.com> 0.6.14-18
- another quoted variable fixes for spaces in filenames
- use SGML_INCLUDE in man backend(upstream)
- change upstream URL to something useful
- escape dots and single quotes in column 1 in docbook2man-spec.pl
* Mon Jun 29 2009 Ondrej Vasik <ovasik@redhat.com> 0.6.14-17
- fix pdf subpackage requires(to match TeXLive2008 provides)

View File

@ -1499,6 +1499,11 @@ sgml('cdata', sub
# Escape backslashes
$_[0] =~ s/\\/\\\\/g;
# Escape dots and single quotes in column 1
$_[0] =~ s/^[ \t]*\./\\\&\./;
$_[0] =~ s/^[ \t]*\'/\\\&\'/;
# In non-'pre'-type elements:
if(!$nocollapse_whitespace) {
# Change tabs to spaces