texlive[53278] Master/tlpkg: renice, doc, archive old script

commits+karl at tug.org commits+karl at tug.org
Tue Dec 31 19:46:04 CET 2019


Revision: 53278
          http://tug.org/svn/texlive?view=revision&revision=53278
Author:   karl
Date:     2019-12-31 19:46:04 +0100 (Tue, 31 Dec 2019)
Log Message:
-----------
renice, doc, archive old script

Modified Paths:
--------------
    trunk/Master/tlpkg/TeXLive/TLUtils.pm
    trunk/Master/tlpkg/bin/ctan2tl
    trunk/Master/tlpkg/bin/tl-update-bindir
    trunk/Master/tlpkg/bin/tl-update-images

Added Paths:
-----------
    trunk/Master/tlpkg/bin/archive/svnchangelog

Removed Paths:
-------------
    trunk/Master/tlpkg/bin/svnchangelog

Modified: trunk/Master/tlpkg/TeXLive/TLUtils.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLUtils.pm	2019-12-31 18:44:35 UTC (rev 53277)
+++ trunk/Master/tlpkg/TeXLive/TLUtils.pm	2019-12-31 18:46:04 UTC (rev 53278)
@@ -3602,7 +3602,7 @@
 
 =head2 Miscellaneous
 
-Some ideas from Fabrice Popineau's C<FileUtils.pm>.
+A few ideas from Fabrice Popineau's C<FileUtils.pm>.
 
 =over 4
 
@@ -4470,7 +4470,7 @@
     print STDERR "" .
       "$prg [ERROR]: Either -sys or -user mode is required.\n" .
       "$prg [ERROR]: In nearly all cases you should use $prg -sys.\n" .
-      "$prg [ERROR]: For special cases see http://tug.org/texlive/scripts-sys-user.html\n" ;
+      "$prg [ERROR]: For special cases see https://tug.org/texlive/scripts-sys-user.html\n" ;
     exit(1);
   }
   return ($texmfconfig, $texmfvar);
@@ -4540,6 +4540,12 @@
 }
 
 

+=back
+
+=head2 JSON
+
+=over 4
+
 =item C<encode_json($ref)>
 
 Returns the JSON representation of the object C<$ref> is pointing at.
@@ -4562,7 +4568,10 @@
 
 our $jsonmode = "";
 
+=pod
+
 =item C<True()>
+
 =item C<False()>
 
 These two crazy functions must be used to get proper JSON C<true> and
@@ -4710,8 +4719,13 @@
   my $ret = "[" . join(",", map { encode_json(\$_) } @$hr) . "]";
   return($ret);
 }
+
+=pod
+
 =back
+
 =cut
+
 1;
 __END__
 
@@ -4724,7 +4738,7 @@
 =head1 AUTHORS AND COPYRIGHT
 
 This script and its documentation were written for the TeX Live
-distribution (L<http://tug.org/texlive>) and both are licensed under the
+distribution (L<https://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
 =cut

Copied: trunk/Master/tlpkg/bin/archive/svnchangelog (from rev 53277, trunk/Master/tlpkg/bin/svnchangelog)
===================================================================
--- trunk/Master/tlpkg/bin/archive/svnchangelog	                        (rev 0)
+++ trunk/Master/tlpkg/bin/archive/svnchangelog	2019-12-31 18:46:04 UTC (rev 53278)
@@ -0,0 +1,100 @@
+#!/bin/sh
+# $Id$
+# Public domain.  Originally written 2004, Karl Berry.
+# Get change info from svn log.  (see now-deleted p4changelog for the
+# previous code using p4.)
+# 
+# Not used since the beginning of regular commit email:
+# https://tug.org/pipermail/tex-live/
+
+umask 0
+
+debug=true
+chicken=${OVERRIDE_CHICKEN-false}
+
+# to get started, ran svn log and put the first thousand changes in log.
+
+# we are in Master/tlpkg/bin
+mydir=`dirname $0` # Master/tlpkg/bin
+outdir=`cd $mydir/../../../Build/logs && pwd`
+outfile=$outdir/svnlog
+test ! -f $outfile && exit 2  # error probably given by the cd
+
+# get the revision number we last logged
+line=`grep '^r[0-9]' $outfile | head -1 | sed 's/^r//'`
+lastlogged=`echo "$line" | awk '{print $1}'`
+echo "$lastlogged" | egrep '^[0-9]+$' >/dev/null \
+|| { echo "$0: no change number in r line of $outfile: $line"; 
+     exit 1; }
+
+nextneeded=`expr $lastlogged + 1`
+$debug && echo "lastlogged=$lastlogged, nextneeded=$nextneeded"
+if test -z "$nextneeded"; then
+  echo "$0: empty nextneeded?!"
+  exit 1
+fi
+
+# get the log info since then.
+tlroot=`cd $mydir/../../.. && pwd`
+newlogs=$outdir/newlogdata
+svn log -v -r HEAD:$nextneeded $tlroot >$newlogs || exit 1
+# with HEAD:next we get the entries newest first, as we want them.
+$debug && ls -l $newlogs
+
+line=`grep '^r[0-9]* |' $newlogs | head -1 | sed 's/^r//'`
+latestchange=`echo "$line" | awk '{print $1}'`
+$debug && echo "latestchange=$latestchange"
+if test -z "$latestchange"; then
+  echo "$0: empty latestchange?!"
+  exit 1
+fi
+
+# done if nothing submitted since last change.
+# or if only one commit has been made, because we ourselves do a commit,
+# so otherwise we'd add a useless entry every time we're run.
+test $latestchange -le $nextneeded && exit 0
+
+# rotate logs if crossed a 1000-change mark.
+rotate=false
+for c in `seq $latestchange -1 $nextneeded`; do
+  echo $c | grep '001$' >/dev/null && rotate=true
+done
+$debug && echo "rotate=$rotate"
+
+if ! $chicken && $rotate; then
+  mv -v $outfile $outfile.$lastlogged
+  gzip -v $outfile.$lastlogged
+  chmod 444 $outfile.$lastlogged.gz
+  ls -l $outfile.$lastlogged.gz
+  svn add $outfile.$lastlogged.gz
+  cp /dev/null $outfile
+fi
+
+# prepend new changes to current log, and put log messages first.
+$mydir/../libexec/svnchangelog.sed $newlogs >$outfile.new
+cat $outfile >>$outfile.new
+
+if $debug; then  # really debug
+  # show first and last change number in each file.
+  for f in $newlogs $outfile $outfile.new; do
+    echo
+    (cd `dirname $f` && ls -l `basename $f`)
+    grep '^r[0-9]* |' $f | head -1
+    grep '^r[0-9]* |' $f | tail -1
+  done
+fi
+
+if ! $chicken; then
+  mv $outfile.new $outfile
+  echo "svn commit..."
+  svn commit -m"regenerated by $0" $outdir
+fi
+
+$mydir/../libexec/svnchangelog.sed $newlogs  # show it to me
+$debug || rm -f $newlogs $outfile.new  # keep them in case of problems
+
+exit 0
+
+# to get things started:
+svn log -v -r 1000:1 /home/texlive/trunk/ >svnlog
+svn add svnlog

Modified: trunk/Master/tlpkg/bin/ctan2tl
===================================================================
--- trunk/Master/tlpkg/bin/ctan2tl	2019-12-31 18:44:35 UTC (rev 53277)
+++ trunk/Master/tlpkg/bin/ctan2tl	2019-12-31 18:46:04 UTC (rev 53278)
@@ -4,6 +4,7 @@
 #
 # Attempt to push a package from CTAN into TL.
 
+renice 20 $$ >&/dev/null
 unset CDPATH  # avoid extraneous output
 LC_ALL=C; export LC_ALL # avoid problems with diff, comm, etc
 

Deleted: trunk/Master/tlpkg/bin/svnchangelog
===================================================================
--- trunk/Master/tlpkg/bin/svnchangelog	2019-12-31 18:44:35 UTC (rev 53277)
+++ trunk/Master/tlpkg/bin/svnchangelog	2019-12-31 18:46:04 UTC (rev 53278)
@@ -1,97 +0,0 @@
-#!/bin/sh
-# $Id$
-# Public domain.  Originally written 2004, Karl Berry.
-# Get change info from svn log.  (see now-deleted p4changelog for the
-# previous code using p4.)
-
-umask 0
-
-debug=true
-chicken=${OVERRIDE_CHICKEN-false}
-
-# to get started, ran svn log and put the first thousand changes in log.
-
-# we are in Master/tlpkg/bin
-mydir=`dirname $0` # Master/tlpkg/bin
-outdir=`cd $mydir/../../../Build/logs && pwd`
-outfile=$outdir/svnlog
-test ! -f $outfile && exit 2  # error probably given by the cd
-
-# get the revision number we last logged
-line=`grep '^r[0-9]' $outfile | head -1 | sed 's/^r//'`
-lastlogged=`echo "$line" | awk '{print $1}'`
-echo "$lastlogged" | egrep '^[0-9]+$' >/dev/null \
-|| { echo "$0: no change number in r line of $outfile: $line"; 
-     exit 1; }
-
-nextneeded=`expr $lastlogged + 1`
-$debug && echo "lastlogged=$lastlogged, nextneeded=$nextneeded"
-if test -z "$nextneeded"; then
-  echo "$0: empty nextneeded?!"
-  exit 1
-fi
-
-# get the log info since then.
-tlroot=`cd $mydir/../../.. && pwd`
-newlogs=$outdir/newlogdata
-svn log -v -r HEAD:$nextneeded $tlroot >$newlogs || exit 1
-# with HEAD:next we get the entries newest first, as we want them.
-$debug && ls -l $newlogs
-
-line=`grep '^r[0-9]* |' $newlogs | head -1 | sed 's/^r//'`
-latestchange=`echo "$line" | awk '{print $1}'`
-$debug && echo "latestchange=$latestchange"
-if test -z "$latestchange"; then
-  echo "$0: empty latestchange?!"
-  exit 1
-fi
-
-# done if nothing submitted since last change.
-# or if only one commit has been made, because we ourselves do a commit,
-# so otherwise we'd add a useless entry every time we're run.
-test $latestchange -le $nextneeded && exit 0
-
-# rotate logs if crossed a 1000-change mark.
-rotate=false
-for c in `seq $latestchange -1 $nextneeded`; do
-  echo $c | grep '001$' >/dev/null && rotate=true
-done
-$debug && echo "rotate=$rotate"
-
-if ! $chicken && $rotate; then
-  mv -v $outfile $outfile.$lastlogged
-  gzip -v $outfile.$lastlogged
-  chmod 444 $outfile.$lastlogged.gz
-  ls -l $outfile.$lastlogged.gz
-  svn add $outfile.$lastlogged.gz
-  cp /dev/null $outfile
-fi
-
-# prepend new changes to current log, and put log messages first.
-$mydir/../libexec/svnchangelog.sed $newlogs >$outfile.new
-cat $outfile >>$outfile.new
-
-if $debug; then  # really debug
-  # show first and last change number in each file.
-  for f in $newlogs $outfile $outfile.new; do
-    echo
-    (cd `dirname $f` && ls -l `basename $f`)
-    grep '^r[0-9]* |' $f | head -1
-    grep '^r[0-9]* |' $f | tail -1
-  done
-fi
-
-if ! $chicken; then
-  mv $outfile.new $outfile
-  echo "svn commit..."
-  svn commit -m"regenerated by $0" $outdir
-fi
-
-$mydir/../libexec/svnchangelog.sed $newlogs  # show it to me
-$debug || rm -f $newlogs $outfile.new  # keep them in case of problems
-
-exit 0
-
-# to get things started:
-svn log -v -r 1000:1 /home/texlive/trunk/ >svnlog
-svn add svnlog

Modified: trunk/Master/tlpkg/bin/tl-update-bindir
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-bindir	2019-12-31 18:44:35 UTC (rev 53277)
+++ trunk/Master/tlpkg/bin/tl-update-bindir	2019-12-31 18:46:04 UTC (rev 53278)
@@ -3,8 +3,8 @@
 # Update a TeX Live Master/bin/PLATFORM directory.
 
 vc_id='$Id$'
+renice 20 $$ >&/dev/null
 unset CDPATH
-unset GREP_OPTIONS
 unset LS_COLORS
 
 tmpdir=${TMPDIR-/tmp}/tlupbin.$$

Modified: trunk/Master/tlpkg/bin/tl-update-images
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-images	2019-12-31 18:44:35 UTC (rev 53277)
+++ trunk/Master/tlpkg/bin/tl-update-images	2019-12-31 18:46:04 UTC (rev 53278)
@@ -16,8 +16,8 @@
 D=`date +%Y%m%d`
 target=/home/ftp/texlive/Images/test
 
-renice +19 -p $$ >/dev/null 2>&1
-umask 0
+renice 20 $$ >/dev/null 2>&1
+umask 002
 unset CDPATH  # avoid output from cd
 XZ_OPT=-6e; export XZ_OPT # compression level, -9 for slowest-but-most,
                           # which is not worth the (excessive) time.



More information about the tex-live-commits mailing list