[Debian-tex-commits] SVN tex-common commit + diffs: r5121 - in tex-common/branches/v3: debian scripts

Norbert Preining preining at alioth.debian.org
Sat Mar 3 14:27:21 UTC 2012


Author: preining
Date: 2012-03-03 14:27:21 +0000 (Sat, 03 Mar 2012)
New Revision: 5121

Added:
   tex-common/branches/v3/scripts/update-texmf
   tex-common/branches/v3/scripts/update-texmf.8
Modified:
   tex-common/branches/v3/debian/changelog
   tex-common/branches/v3/debian/postinst.in
   tex-common/branches/v3/debian/postrm.in
   tex-common/branches/v3/debian/rules
Log:
reintroduce a sligthly changed update-texmf


Modified: tex-common/branches/v3/debian/changelog
===================================================================
--- tex-common/branches/v3/debian/changelog	2012-03-03 08:49:07 UTC (rev 5120)
+++ tex-common/branches/v3/debian/changelog	2012-03-03 14:27:21 UTC (rev 5121)
@@ -1,3 +1,9 @@
+tex-common (3.0-1~7) unstable; urgency=low
+
+  * reintroduce update-texmf
+
+ -- Norbert Preining <preining at debian.org>  Sat, 03 Mar 2012 23:26:46 +0900
+
 tex-common (3.0-1~6) unstable; urgency=low
 
   * revert the backward compatibility mode, we cannot

Modified: tex-common/branches/v3/debian/postinst.in
===================================================================
--- tex-common/branches/v3/debian/postinst.in	2012-03-03 08:49:07 UTC (rev 5120)
+++ tex-common/branches/v3/debian/postinst.in	2012-03-03 14:27:21 UTC (rev 5121)
@@ -11,8 +11,6 @@
 ## Define static variables we need
 UCF_FILES="<:=$TEX_COMMON_UCF_FILES:>"
 TEXMFSYSVARDIR="<:=$TEXMFSYSVARDIR:>"
-UCF="ucf --debconf-ok"
-#UCF="ucf -d --debconf-ok --verbose"
 OLD_LDAT=/etc/texmf/language.dat
 POSTINST_MOVE_EXT="<:=$POSTINST_MOVE_EXT:>"
 FONTCACHE_PERMS=<:=$FONTCACHE_PERMS:>
@@ -301,6 +299,8 @@
         ;;
 
     configure|reconfigure)
+    # create/update texmf.cnf
+    update-texmf
     #
     # whatever we do, we remove the updmap.cfg file in /var/lib/texmf/web2c!!
     # it was created by former versions of update-updmap and disturbs the 

Modified: tex-common/branches/v3/debian/postrm.in
===================================================================
--- tex-common/branches/v3/debian/postrm.in	2012-03-03 08:49:07 UTC (rev 5120)
+++ tex-common/branches/v3/debian/postrm.in	2012-03-03 14:27:21 UTC (rev 5121)
@@ -30,6 +30,10 @@
   purge)
     # TODO purge ucf files
 
+    # remove texmf.cnf
+    rm -rf /etc/texmf/web2c/texmf.cnf
+    rmdir --ignore-fail-on-non-empty /etc/texmf/web2c
+
     # try to remove /usr/local/share/texmf if it is empty
     # people should normally not have TEXMFLOCAL ls-R files
     # unless they called mktexlsr manually, in which case this is fine

Modified: tex-common/branches/v3/debian/rules
===================================================================
--- tex-common/branches/v3/debian/rules	2012-03-03 08:49:07 UTC (rev 5120)
+++ tex-common/branches/v3/debian/rules	2012-03-03 14:27:21 UTC (rev 5121)
@@ -6,7 +6,7 @@
 INSTDIR=$(CURDIR)/debian/tex-common
 
 bin_scripts=dh_installtex
-sbin_scripts=update-fmtlang update-texmf-config update-updmap
+sbin_scripts=update-fmtlang update-texmf-config update-updmap update-texmf
 nonbin_scripts=tpm2licenses tpm2licenses.README Tpm.pm FileUtils.pm debianize-updmap
 
 sbin_installfiles=$(foreach script,$(sbin_scripts), scripts/$(script))

Copied: tex-common/branches/v3/scripts/update-texmf (from rev 5035, tex-common/trunk/scripts/update-texmf)
===================================================================
--- tex-common/branches/v3/scripts/update-texmf	                        (rev 0)
+++ tex-common/branches/v3/scripts/update-texmf	2012-03-03 14:27:21 UTC (rev 5121)
@@ -0,0 +1,87 @@
+#!/bin/sh
+# update-texmf
+# License: GPL
+
+set -e
+
+TXMF=/etc/texmf
+TXMF_CNF=$TXMF/web2c/texmf.cnf
+CNFDIR=${TXMF}/texmf.d
+TMPDIR=`mktemp -d`
+TMPTXMF=`mktemp -p ${TMPDIR} texmfXXXXXXX`
+
+VERBOSE=false
+DEBUG=false
+while [ $# -ne 0 ]; do
+  case $1 in
+    -v|--verbose)
+      VERBOSE=true
+      shift;;
+    -d|--debug)
+      DEBUG=true
+      VERBOSE=true
+      shift;;
+    *)
+      echo "unknown option: $1"
+      exit 1
+      ;;
+  esac
+done
+
+# test wether /etc isn't mounted read-only
+if touch /etc/texmf/is_rw 2>/dev/null; then
+  rm -f /etc/texmf/is_rw
+else
+  echo "Directory /etc/texmf/ not writeable. Exiting."
+  exit 1
+fi
+
+CNFFILES=`/bin/ls -1 ${CNFDIR}/*.cnf`
+if [ $DEBUG = true ]; then
+  echo "Using the following files:"
+  for file in $CNFFILES; do
+    echo $file
+  done
+fi
+
+if [ "${VERBOSE}" = "true" ]; then
+  if [ -f "${TXMF_CNF}" ]; then
+    echo -n "Merging information from /etc/texmf/texmf.d/ into ${TXMF_CNF} ... " >&2
+  else
+    echo -n "Generating ${TXMF_CNF} ... " >&2
+  fi
+fi
+
+cat > ${TMPTXMF} <<EOF
+%%% This file is automatically generated by update-texmf
+%
+% PLEASE DO NOT EDIT THIS FILE DIRECTLY. It is meant to be generated from 
+% files in /etc/texmf/texmf.d/. 
+%
+% Therefore, if you want a smooth upgrade, please edit the files
+% in ${CNFDIR}, 
+% or create an additional one (with the extension '.cnf'),
+% and invoke update-texmf.
+%
+%%%
+
+EOF
+
+for i in ${CNFFILES}; do
+    echo "%%% From file: $i" >> ${TMPTXMF}
+    cat $i >> ${TMPTXMF}
+    echo "%%% End of file: $i" >> ${TMPTXMF}
+done
+
+mkdir -p ${TXMF}/web2c
+cp ${TMPTXMF} ${TXMF_CNF}
+rm -r ${TMPDIR}
+chmod 644 ${TXMF_CNF}
+
+if [ "${VERBOSE}" = "true" ]; then
+  echo "done"
+fi
+
+#
+# Let vim know that we don't want tabs
+# vim:set expandtab: #

Copied: tex-common/branches/v3/scripts/update-texmf.8 (from rev 5035, tex-common/trunk/scripts/update-texmf.8)
===================================================================
--- tex-common/branches/v3/scripts/update-texmf.8	                        (rev 0)
+++ tex-common/branches/v3/scripts/update-texmf.8	2012-03-03 14:27:21 UTC (rev 5121)
@@ -0,0 +1,38 @@
+.TH UPDATE-TEXMF 8
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+update-texmf \- shell script to generate /etc/texmf/texmf.cnf
+.SH SYNOPSIS
+.B update-texmf
+.I "[options]"
+.br
+.SH DESCRIPTION
+This manual page documents briefly the
+.BR update-texmf
+command.
+This manual page was written for the Debian GNU/Linux distribution
+because the original script was designed for Debian packaging system.
+.PP
+.B update-texmf
+is a shell script to generate /etc/texmf/web2c/texmf.cnf from files in 
+/etc/texmf/texmf.d/*.cnf
+.PP
+A user who wants to customize /etc/texmf/web2c/texmf.cnf should add, 
+for example, 22mymacro.cnf in /etc/texmf/texmf.d/ and run 'update-texmf'.
+.SH OPTIONS
+.TP
+.B \-v, --verbose
+Show verbose messages.
+.TP
+.B \-d, --debug
+Show debugging information, and don't delete temporary files. Implies
+--verbose. 
+.SH SEE ALSO
+.PP
+Further information can be found in
+/usr/share/doc/tex-common/README.Debian.{txt,pdf.html}
+.PP
+.SH AUTHOR
+This manual page was written by Atsuhito Kohda <kohda at debian.org>,
+for the Debian GNU/Linux system (but may be used by others).




More information about the Debian-tex-commits mailing list