Sync from SUSE:SLFO:Main docbook-utils revision c2eb7e513841dab5e40158230dcd6336

This commit is contained in:
Adrian Schröter 2024-05-03 12:07:44 +02:00
commit d85ba21931
7 changed files with 517 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,215 @@
diff -Ndurp docbook-utils-0.6.14/bin/jw.in docbook-utils-0.6.14-fix-bashisms/bin/jw.in
--- docbook-utils-0.6.14/bin/jw.in 2003-04-30 19:21:49.000000000 +0300
+++ docbook-utils-0.6.14-fix-bashisms/bin/jw.in 2014-10-19 16:34:25.485833459 +0300
@@ -1,61 +1,63 @@
-#! /bin/sh
+#!/bin/sh
# Jade Wrapper
# Script to convert a SGML file into some other format
# Send any comments to Eric Bischoff <eric@caldera.de>
# This program is under GPL license. See LICENSE file for details.
# Set help message
-SGML_HELP_MESSAGE="Usage: `basename $0` [<options>] <sgml_file>\n\
-where <options> are:\n\
-\040 -f|--frontend <frontend>: \t Specify the frontend (source format)\n\
-\040 \t\t\t\t (default is docbook)\n\
-\040 -b|--backend <backend>: \t Specify the backend (destination format)\n\
-\040 \t\t\t\t (default is html)\n\
-\040 -c|--cat <file>: \t\t Specify an extra SGML open catalog\n\
-\040 -n|--nostd: \t\t\t Do not use the standard SGML open catalogs\n\
-\040 -d|--dsl <file>|default|none:\t Specify an alternate style sheet\n\
-\040 \t\t\t\t (default is to use the default stylesheet)\n\
-\040 -l|--dcl <file>: \t\t Specify an alternate SGML declaration\n\
-\040 \t\t\t\t (usual ones like xml.dcl get detected automatically)\n\
-\040 -s|--sgmlbase <path>: \t Change base directory for SGML distribution\n\
-\040 \t\t\t\t (usually @prefix@/share/sgml)\n\
-\040 -p|--parser <program>: \t Specify the parser if several are installed\n\
-\040 \t\t\t\t (jade or openjade)\n\
-\040 -o|--output <directory>: \t Set output directory\n\
-\040 -u|--nochunks: \t\t Output only one big file\n\
-\040 \t\t\t\t (overrides the stylesheet settings)\n\
-\040 -i|--include <section>: \t Specify a SGML marked section to include\n\
-\040 \t\t\t\t (should be marked as \"ignore\" in the SGML text)\n\
-\040 -w|--warning <warning_type>|list: Control warnings or display the allowed warning types\n\
-\040 -e|--errors <error_type>|list: Control errors or display the allowed error types\n\
-\040 -h|--help: \t\t\t Print this help message and exit\n\
-\040 -V <variable[=value]>: \t Set a variable\n\
-\040 -v|--version: \t\t Print the version and exit"
+SGML_HELP_MESSAGE="Usage: `basename $0` [<options>] <sgml_file>
+where <options> are:
+ -f|--frontend <frontend>: Specify the frontend (source format)
+ (default is docbook)
+ -b|--backend <backend>: Specify the backend (destination format)
+ (default is html)
+ -c|--cat <file>: Specify an extra SGML open catalog
+ -n|--nostd: Do not use the standard SGML open catalogs
+ -d|--dsl <file>|default|none: Specify an alternate style sheet
+ (default is to use the default stylesheet)
+ -l|--dcl <file>: Specify an alternate SGML declaration
+ (usual ones like xml.dcl get detected
+ automatically)
+ -s|--sgmlbase <path>: Change base directory for SGML distribution
+ (usually @prefix@/share/sgml)
+ -p|--parser <program>: Specify the parser if several are installed
+ (jade or openjade)
+ -o|--output <directory>: Set output directory
+ -u|--nochunks: Output only one big file
+ (overrides the stylesheet settings)
+ -i|--include <section>: Specify a SGML marked section to include
+ (should be marked as \"ignore\" in the SGML
+ text)
+ -w|--warning <warning_type>|list: Control warnings or display the allowed warning types
+ -e|--errors <error_type>|list: Control errors or display the allowed error types
+ -h|--help: Print this help message and exit
+ -V <variable[=value]>: Set a variable
+ -v|--version: Print the version and exit"
# Set list of warning types
-SGML_WARNINGS_LIST="\n\
-\040 xml \t\t Warn about constructs that are not allowed by XML\n\
-\040 mixed \t Warn about mixed content models that do not allow #pcdata anywhere\n\
-\040 sgmldecl \t Warn about various dubious constructions in the SGML declaration\n\
-\040 should \t Warn about various recommendations made in ISO 8879 that the document does not comply with\n\
-\040 default \t Warn about defaulted references\n\
-\040 duplicate \t Warn about duplicate entity declarations\n\
-\040 undefined \t Warn about undefined elements: elements used in the DTD but not defined\n\
-\040 unclosed \t Warn about unclosed start and end-tags\n\
-\040 empty \t Warn about empty start and end-tags\n\
-\040 net \t\t Warn about net-enabling start-tags and null end-tags\n\
-\040 min-tag \t Warn about minimized start and end-tags. Equivalent to: unclosed, empty and net\n\
-\040 unused-map \t Warn about unused short reference maps\n\
-\040 unused-param \t Warn about parameter entities that are defined but not used in a DTD\n\
-\040 notation-sysid Warn about notations for which no system identifier could be generated\n\
-\040 all \t\t Equivalent to: mixed, should, default, undefined, sgmldecl, unused-map, unused-param, empty and unclosed\n\n\
-\040 A warning can be disabled by using its name prefixed with no-. Example: -w all -w no-duplicate"
+SGML_WARNINGS_LIST="
+ xml Warn about constructs that are not allowed by XML
+ mixed Warn about mixed content models that do not allow #pcdata anywhere
+ sgmldecl Warn about various dubious constructions in the SGML declaration
+ should Warn about various recommendations made in ISO 8879 that the document does not comply with
+ default Warn about defaulted references
+ duplicate Warn about duplicate entity declarations
+ undefined Warn about undefined elements: elements used in the DTD but not defined
+ unclosed Warn about unclosed start and end-tags
+ empty Warn about empty start and end-tags
+ net Warn about net-enabling start-tags and null end-tags
+ min-tag Warn about minimized start and end-tags. Equivalent to: unclosed, empty and net
+ unused-map Warn about unused short reference maps
+ unused-param Warn about parameter entities that are defined but not used in a DTD
+ notation-sysid Warn about notations for which no system identifier could be generated
+ all Equivalent to: mixed, should, default, undefined, sgmldecl, unused-map, unused-param, empty and unclosedn\
+ A warning can be disabled by using its name prefixed with no-. Example: -w all -w no-duplicate"
# Set list of error types
-SGML_ERRORS_LIST="\n\
-\040 no-idref \t No error for an ID reference value which no element has as its ID\n\
-\040 no-significant No errors for characters not significant in the reference concrete syntax\n\
-\040 no-valid \t Do not require the document to be type-valid"
+SGML_ERRORS_LIST="
+ no-idref No error for an ID reference value which no element has as its ID
+ no-significant No errors for characters not significant in the reference concrete syntax
+ no-valid Do not require the document to be type-valid"
# Get name of main SGML configuration file
which sgmlwhich >/dev/null 2>/dev/null
@@ -186,8 +188,8 @@ do case $1 in
shift 2
;;
-w|--warning) case $2 in
- list) echo -e "List of allowed warning types (multiple -w options are allowed):\n"
- echo -e $SGML_WARNINGS_LIST
+ list) echo "List of allowed warning types (multiple -w options are allowed):"
+ echo $SGML_WARNINGS_LIST
exit 0
;;
xml|mixed|sgmldecl|should|default|duplicate|undefined|unclosed|empty|net|min-tag|unused-map|unused-param|notation-sysid|all|no-xml|no-mixed|no-sgmldecl|no-should|no-default|no-duplicate|no-undefined|no-unclosed|no-empty|no-net|no-min-tag|no-unused-map|no-unused-param|no-notation-sysid) \
@@ -195,14 +197,14 @@ do case $1 in
shift 2
;;
*) echo "Unknown warning type \"$2\". Allowed warning types are:" >&2
- echo -e $SGML_WARNINGS_LIST >&2
+ echo $SGML_WARNINGS_LIST >&2
exit 1
;;
esac
;;
-e|--error) case $2 in
- list) echo -e "List of allowed error types (multiple -e options are allowed):\n"
- echo -e $SGML_ERRORS_LIST
+ list) echo "List of allowed error types (multiple -e options are allowed):"
+ echo $SGML_ERRORS_LIST
exit 0
;;
no-idref|no-significant|no-valid) \
@@ -210,19 +212,20 @@ do case $1 in
shift 2
;;
*) echo "Unknown error type \"$2\". Allowed error types are:" >&2
- echo -e $SGML_ERRORS_LIST >&2
+ echo $SGML_ERRORS_LIST >&2
exit 1
;;
esac
;;
- -h|--help) echo -e "`basename $0` - Jade Wrapper\n"
- echo -e "$SGML_HELP_MESSAGE"
+ -h|--help) echo "`basename $0` - Jade Wrapper"
+ echo
+ echo "$SGML_HELP_MESSAGE"
exit 0
;;
- -v|--version) echo -e "$SGML_VERSION_MESSAGE"
+ -v|--version) echo "$SGML_VERSION_MESSAGE"
exit 0
;;
- -*) echo -e "$SGML_HELP_MESSAGE" >&2
+ -*) echo "$SGML_HELP_MESSAGE" >&2
exit 1
;;
*) if [ -z "$SGML_FILE" ]
@@ -233,7 +236,7 @@ do case $1 in
esac
shift 1
else
- echo -e "$SGML_HELP_MESSAGE" >&2
+ echo "$SGML_HELP_MESSAGE" >&2
exit 1
fi
;;
@@ -243,7 +246,7 @@ done
# Check that we have a frontend
if [ -z "$SGML_FRONTEND" ]
then
- echo -e $SGML_HELP_MESSAGE >&2
+ echo $SGML_HELP_MESSAGE >&2
exit 1
fi
if [ ! -s $SGML_FRONTEND ]
@@ -255,7 +258,7 @@ fi
# Check that we have a backend
if [ -z "$SGML_BACKEND" ]
then
- echo -e $SGML_HELP_MESSAGE >&2
+ echo $SGML_HELP_MESSAGE >&2
exit 1
fi
if [ ! -s $SGML_BACKEND ]
@@ -267,7 +270,7 @@ fi
# Check that we have a file to process
if [ -z "$SGML_FILE" ]
then
- echo -e $SGML_HELP_MESSAGE >&2
+ echo $SGML_HELP_MESSAGE >&2
exit 1
fi
if [ ! -s $SGML_FILE ]
@@ -402,7 +405,7 @@ fi
# Create output directory if not available
if [ -z "$SGML_OUTPUT_DIRECTORY" ]
then
- echo -e $SGML_HELP_MESSAGE >&2
+ echo $SGML_HELP_MESSAGE >&2
exit 1
fi
if [ ! -d $SGML_OUTPUT_DIRECTORY ]

BIN
docbook-utils-0.6.14.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
--- docbook-utils-0.6.14/bin/jw.in.catalog 2004-11-08 11:49:28.650526879 +0100
+++ docbook-utils-0.6.14/bin/jw.in 2004-11-08 11:48:25.783155906 +0100
@@ -73,7 +73,7 @@
SGML_STANDARD_CATALOGS="yes"
# Set path to user SGML catalogs
-SGML_EXTRA_CATALOGS=""
+SGML_EXTRA_CATALOGS=":/etc/sgml/catalog:/usr/share/sgml/CATALOG.docbook-dsssl-stylesheets"
# Set SGML base directory and centralized catalogs directory
SGML_BASE_DIR="@prefix@/share/sgml"
@@ -291,6 +291,7 @@
# Use SGML declaration for XML if needed
if [ "$SGML_DECL" = "" -a "$SGML_XML" = "xml" ]
then SGML_DECL=${SGML_BASE_DIR}/xml.dcl
+ [ -f $SGML_DECL ] || SGML_DECL=${SGML_BASE_DIR}/opensp/xml.dcl
fi
# Try to find the SGML normalizer
Diff finished. Mon Nov 8 11:49:40 2004

94
docbook-utils.changes Normal file
View File

@ -0,0 +1,94 @@
-------------------------------------------------------------------
Mon Nov 27 09:34:34 UTC 2023 - Jiri Srain <jsrain@suse.com>
- fix the download URL
-------------------------------------------------------------------
Sat Jan 21 00:10:19 UTC 2017 - bwiedemann@suse.com
- Add support_source_date_epoch.patch to allow for reproducible builds
of depending packages like freerdp
-------------------------------------------------------------------
Sun Oct 19 14:05:00 UTC 2014 - Led <ledest@gmail.com>
- fix bashisms of jw script
- add patches:
* docbook-utils-0.6.14-fix-bashisms.patch
-------------------------------------------------------------------
Wed Apr 18 07:51:09 UTC 2012 - coolo@suse.com
- split out the backends that do not require tex to work
-------------------------------------------------------------------
Thu Dec 1 16:45:16 UTC 2011 - coolo@suse.com
- add automake as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de
- Remove redundant tags/sections from specfile
(cf. packaging guidelines)
- Use %_smp_mflags for parallel build
-------------------------------------------------------------------
Tue Dec 22 18:40:40 CET 2009 - jengelh@medozas.de
- enable parallel build
-------------------------------------------------------------------
Mon Mar 17 11:15:39 CET 2008 - werner@suse.de
- Use texlive-jadetex instead of jadetex
-------------------------------------------------------------------
Wed Jan 25 21:45:22 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Fri Nov 26 13:11:21 CET 2004 - ke@suse.de
- Require 'jadetex'; reported by Philipp Thomas [#48577].
-------------------------------------------------------------------
Mon Nov 8 16:51:01 CET 2004 - ke@suse.de
- Prepend ':' to the list of SGML_EXTRA_CATALOGS to make sure
SGML_CATALOG_FILES are always properly separated; reported by Ruediger
Oertel.
-------------------------------------------------------------------
Mon Nov 8 13:18:37 CET 2004 - ke@suse.de
- Fix problem with finding XML related catalogs; reported by Kerry Cox
[# 48020].
-------------------------------------------------------------------
Thu Feb 12 11:54:54 CET 2004 - ke@suse.de
- Update to version 0.6.14: bugfixes, use w3m als fallback for text
generation.
-------------------------------------------------------------------
Thu Jan 15 12:02:57 CET 2004 - ke@suse.de
- Update to version 0.6.13.
-------------------------------------------------------------------
Thu Jun 12 15:18:36 CEST 2003 - coolo@suse.de
- package dirs too
-------------------------------------------------------------------
Mon May 19 08:04:09 CEST 2003 - coolo@suse.de
- package docs too
-------------------------------------------------------------------
Tue Apr 17 00:37:22 CEST 2001 - adrian@suse.de
- created package

120
docbook-utils.spec Normal file
View File

@ -0,0 +1,120 @@
#
# spec file for package docbook-utils
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: docbook-utils
BuildRequires: automake
BuildRequires: docbook-dsssl-stylesheets
BuildRequires: openjade
BuildRequires: perl-SGMLS
BuildRequires: sgml-skel
Summary: Small Wrapper Scripts for Processing DocBook Files
License: LGPL-2.1-or-later
Group: Productivity/Publishing/DocBook
Version: 0.6.14
Release: 0
Requires: %{name}-minimal
Requires: texlive-jadetex
Source: https://src.fedoraproject.org/repo/pkgs/docbook-utils/%{name}-%{version}.tar.gz/6b41b18c365c01f225bc417cf632d81c/%{name}-%{version}.tar.gz
Patch0: docbook-utils-catalog-jw.patch
Patch1: docbook-utils-0.6.14-fix-bashisms.patch
# PATCH-FIX-TO-UPSTREAM
Patch2: support_source_date_epoch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
The docbook-utils package is a set of a few small programs intended to
ease everyday use of technical documentation software based on the
DocBook DTD, either written in SGML or XML.
Tasks they currently accomplish are: * jw: convert SGML files to
other formats (HTML, RTF, PostScript, PDF)
* sgmldiff: detect the differences in markup between two SGML files
%package minimal
Summary: Small Wrapper Scripts for Processing DocBook Files
Group: Productivity/Publishing/DocBook
Requires: docbook-dsssl-stylesheets
Requires: docbook_3
Requires: docbook_4
Requires: iso_ent
Requires: openjade
Requires: opensp
Requires: perl-SGMLS
Requires: sgml-skel
%description minimal
The docbook-utils package is a set of a few small programs intended to
ease everyday use of technical documentation software based on the
DocBook DTD, either written in SGML or XML.
Tasks they currently accomplish are: * jw: convert SGML files to
other formats (HTML, RTF, PostScript, PDF)
* sgmldiff: detect the differences in markup between two SGML files
%prep
%setup -q
%patch0 -p1 -b .catalog
%patch1 -p1
%patch2 -p1
%build
autoreconf -i -f
%configure
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
mv $RPM_BUILD_ROOT/usr/doc/html/docbook* html
%files minimal
%defattr (-,root,root)
%doc README COPYING TODO html
%_bindir/docbook2html
%_bindir/docbook2man
%_bindir/docbook2rtf
%_bindir/jw
%_bindir/sgmldiff
%_bindir/docbook2txt
%dir %{_prefix}/share/sgml/docbook/utils-%{version}
%dir %{_prefix}/share/sgml/docbook/utils-%{version}/backends
%{_prefix}/share/sgml/docbook/utils-%{version}/frontends
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/html
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/man
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/rtf
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/txt
%{_prefix}/share/sgml/docbook/utils-%{version}/docbook-utils.dsl
%{_prefix}/share/sgml/docbook/utils-%{version}/helpers
%files
%defattr (-,root,root)
%_bindir/docbook2ps
%_bindir/docbook2dvi
%_bindir/docbook2pdf
%_bindir/docbook2tex
%_bindir/docbook2texi
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/tex
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/texi
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/dvi
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/ps
%{_prefix}/share/sgml/docbook/utils-%{version}/backends/pdf
%{_mandir}/man?/*
%changelog

View File

@ -0,0 +1,41 @@
Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Support SOURCE_DATE_EPOCH for timestamps
To allow generating documents in a reproducible way,
allow overriding the timestamp through the environment.
.
See also: https://reproducible-builds.org/specs/source-date-epoch/
Bug-Debian: https://bugs.debian.org/800797
Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
===================================================================
--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl
+++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl
@@ -57,6 +57,7 @@ Software Foundation, 675 Mass Ave, Cambr
use SGMLS; # Use the SGMLS package.
use SGMLS::Output; # Use stack-based output.
use SGMLS::Refs;
+use POSIX qw(strftime setlocale LC_TIME);
########################################################################
# SGMLSPL script produced automatically by the script sgmlspl.pl
@@ -279,6 +280,11 @@ sgml('</REFMETA>', sub {
_END_BANNER
my $manpage_date = `date "+%d %B %Y"`;
+ if ($ENV{SOURCE_DATE_EPOCH}) {
+ setlocale(LC_TIME, "C");
+ $manpage_date = strftime("%d %B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time));
+ }
+
output '.TH "';
@@ -292,7 +298,7 @@ _END_BANNER
}
output '" "', fold_string($manpage_sect),
- '" "', fold_string(`date "+%d %B %Y"`),
+ '" "', fold_string($manpage_date),
'" "', $manpage_misc,
'" "', $manpage_manual,
"\"\n";