From 255db2f3bb08ad2932f94408958bf388e138275d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 10 Jun 2008 01:18:26 +0000 Subject: first cut at making images git-svn-id: svn://tug.org/texlive/trunk@8631 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tl-make-install-pkg | 192 ------------------------------ Master/tlpkg/bin/tl-update-images | 112 +++++++++++++++++ Master/tlpkg/bin/tl-update-install-pkg | 192 ++++++++++++++++++++++++++++++ Master/tlpkg/bin/tlpsrc2tlpdb | 8 +- Master/tlpkg/tlpsrc/00texlive.core.tlpsrc | 1 - 5 files changed, 305 insertions(+), 200 deletions(-) delete mode 100755 Master/tlpkg/bin/tl-make-install-pkg create mode 100755 Master/tlpkg/bin/tl-update-images create mode 100755 Master/tlpkg/bin/tl-update-install-pkg (limited to 'Master') diff --git a/Master/tlpkg/bin/tl-make-install-pkg b/Master/tlpkg/bin/tl-make-install-pkg deleted file mode 100755 index 44b1e38f1b5..00000000000 --- a/Master/tlpkg/bin/tl-make-install-pkg +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/env perl -# $Id$ -# -# Copyright 2008 Reinhard Kotucha, Norbert Preining -# This file is licensed under the GNU General Public License version 2 -# or any later version. - -# This script creates the zip (everything) and tgz (omits windows) -# archives to do a network install. Runs from cron. - -BEGIN { - $^W = 1; - my $me=$0; - $thisdir=`pwd`; - chomp ($thisdir); - if ($me=~m!/!) { - ($::installerdir=$me)=~s!(.*)/.*$!$1/../..!; - } else { - $::installerdir='../..'; - } - chdir $installerdir or die "can't chdir \"$installerdir\".\n"; - $installerdir=`pwd`; - chomp ($installerdir); - unshift (@INC, "$::installerdir/tlpkg"); -} - -use TeXLive::TLUtils qw(mkdirhier copy get_system_tmpdir info); -use TeXLive::TLPDB; -use TeXLive::TLPOBJ; -use Getopt::Long; -$Getopt::Long::autoabbrev=0; - -$opt_help=0; -$opt_verbose=0; -$opt_outputdir=0; - -sub usage -{ - print <<'EOF'; -Usage: - tl-make-install-pkg [-h|--help] [-v|--verbose] -o|--outputdir=dir - - tl-make-install-pkg generates a .tar.gz file for Unix and a .zip file - for all systems containing all the files needed to install TeX Live - from the network. - - Options: - -h|--help Print this message. - -o|--outputdir Target directory. Must exist and be writable. - -v|--verbose Extra messages. -EOF -; - exit 0; -} - -usage if (@ARGV<1); - -TeXLive::TLUtils::process_logging_options(); -GetOptions( - "verbose|v", - "outputdir|o=s", - "help|h") or usage; - -usage if $opt_help; - -### determine directories. - -my $sys_tmp=get_system_tmpdir or die "No system TMPDIR found."; -my $tmpdir="$sys_tmp/install-tl-$$"; -my $inst_tmp="$sys_tmp/install-tl-$$/install-tl"; -my $outputdir="$opt_outputdir"; -$outputdir="$thisdir/$outputdir" unless ($outputdir=~m!^/!); - -### cleanup. - -my @signals=qw(HUP INT ILL FPE SEGV TERM ABRT QUIT BUS PIPE); - -sub cleanup { - if (-d "$tmpdir") { - system('rm', '-rf', "$tmpdir"); - } -} - -foreach my $signal (@signals) { - $SIG{"$signal"}=\&cleanup; -} - -### create directories. - -die "$tmpdir already exists.\n" if (-d "$tmpdir"); - -mkdir "$tmpdir" or die "Can't mkdir \"$tmpdir\".\n"; -mkdir "$inst_tmp" or die "Can't mkdir \"$inst_tmp\".\n"; - -if ($opt_verbose) { - info("thisdir: \"$thisdir\"\n"); - info("installerdir: \"$installerdir\"\n"); - info("sys_tmp: \"$sys_tmp\"\n"); - info("tmpdir: \"$tmpdir\"\n"); - info("inst_tmp: \"$inst_tmp\"\n"); - info("outputdir: \"$outputdir\"\n"); -} - -die "outputdir \"$outputdir\" dosn't exist.\n" unless (-d "$outputdir"); -die "outputdir \"$outputdir\" is not writable.\n" unless (-w "$outputdir"); - -### read TLPDB and extract files - -my $tlpdb = TeXLive::TLPDB->new ("root" => "$installerdir"); -die("Cannot find tlpdb in $installerdir!\n") unless defined($tlpdb); -my $tlp = $tlpdb->get_package("00texlive.installer"); -die("Cannot find package 00texlive.installer in ${installerdir}'s texlive.tlpdb\n") unless defined($tlp); - -my $tlpinfra = $tlpdb->get_package("texlive.infra"); -die("Cannot find package texlive.infra in ${installerdir}'s texlive.tlpdb\n") unless defined($tlp); - - -my @unix; -push @unix, $tlp->runfiles; -push @unix, $tlpinfra->runfiles; -push @unix, $tlp->docfiles; -my %tlpbin = %{$tlp->binfiles}; -foreach my $a (keys %tlpbin) { - next if ($a =~ m/win32/); - push @unix, @{$tlpbin{$a}}; -} -my @win32; -push @win32, @unix; -if (defined($tlpbin{"win32"})) { - push @win32, @{$tlpbin{"win32"}}; -} - -### copy files from the repository to tmpdir - -sub copy_files { - my ($dir, $file); - for (@_) { - if ($_ !~ m!/!) { - # file in the root, missing ./ - $_ = "./$_"; - } - ($dir, $file) = /^(.*)\/(.*)/; - mkdirhier "$inst_tmp/$dir"; - copy "$_", "$inst_tmp/$dir"; - } -} - -### create the .tar.gz and the .zip file - -sub make_zip -{ - my ($type) = @_; - info("making $type\n"); - - chdir ($tmpdir) || die "chdir($tmpdir) failed: $!"; - if ($type eq 'zip') { - system('zip', '-rq', 'install-tl.zip', 'install-tl'); - } else { - system('tar', '-czf', 'install-tl-unx.tar.gz', 'install-tl'); - } - chdir ($installerdir) || die "chdir($installerdir) failed: $!"; -} - -### copy generated files to outputdir - -sub install_zip -{ - info("installing to $outputdir\n"); - copy "$tmpdir/install-tl-unx.tar.gz", $outputdir; - system ('ls', '-l', "$outputdir/install-tl-unx.tar.gz"); - - copy "$tmpdir/install-tl.zip", $outputdir; - system ('ls', '-l', "$outputdir/install-tl.zip"); -} - -### main -copy_files (@unix); -make_zip 'tgz'; - -copy_files (@win32); -make_zip 'zip'; - -install_zip; - -cleanup; - -### Local Variables: -### perl-indent-level: 2 -### tab-width: 2 -### indent-tabs-mode: nil -### End: -# vim:set tabstop=2 expandtab: # diff --git a/Master/tlpkg/bin/tl-update-images b/Master/tlpkg/bin/tl-update-images new file mode 100755 index 00000000000..a1c48e57cae --- /dev/null +++ b/Master/tlpkg/bin/tl-update-images @@ -0,0 +1,112 @@ +#!/bin/sh -e +# $Id$ +# +# Create the .iso file system images for TeX Live: +# a) live: the complete uncompressed system (for DVD) +# +# Copyright 2003, 2004, 2005 Sebastian Rahtz. +# Copyright 2007, 2008 Karl Berry. +# +# This file is licensed under the GNU General Public License version 2 +# or any later version. +# +# In 2003, we also produced: +# c) demo: live subset which can be run as is (CD) +# but this was dropped in 2004. +# +# From 2004-2007, we also produced: +# b) inst: compressed zip files and installer only (CD) +# but this was dropped in 2008. +# +# Send bug reports or suggestions to tex-live@tug.org. + +unset CDPATH # avoid output from cd +umask 0 +renice +19 -p $$ >/dev/null 2>&1 + +HERE=`cd \`dirname $0\` && /bin/pwd` +cd $HERE || exit 1 # the Master/tlpkg/bin directory +master=`cd ../.. && /bin/pwd` +test -z "$master" && exit 1 + +NAME=texlivetest +V=2008 +D=`date +%Y%m%d` + +debug=${OVERRIDE_DEBUG-false} +target=/home/ftp/texlive/Images/test +work=/home/texlive/tmp/TL_$$ +quiet= # for passing to mkisofs +makelive=true +mkisofs=mkisofs + +while test $# -gt 0; do + case $1 in + --debug) debug=true; quiet=;; + --help) echo "No help, use the source, sorry."; exit 0;; + --mkisofs=*) mkisofs=`echo $1 | sed 's/.*=//'`;; + --nolive) makelive=false;; + --quiet) quiet=-quiet;; + --source=*) master=`echo $1 | sed 's/.*=//'`;; + --work=*) work=`echo $1 | sed 's/.*=//'`;; + --target=*) target=`echo $1 | sed 's/.*=//'`;; + *) break;; + esac + shift +done + +if $debug; then + echo "master = $master" + echo "target = $target" + echo "work = $work" +fi +mkdir -p $target + +# From the days when we made multiple images. Keep it factored out in +# case they come back. +common_mkisofs_options=" $quiet -pad -J -dir-mode 0755 -r \ + -copyright LICENSE.TL \ + -x ./support/tests \ + -x .svn \ +" + +# +MAKELIVE () { + echo "-- `date` Writing live image to $live_iso." + + prefix=$target/$NAME$V + live_iso=$prefix-$D.iso + + # remove old images and checksums. + rm -f $prefix-*.iso* $prefix-*.md5 $prefix-*.sha256 + + # The Master directory is the image. + (cd $master || exit 1 + mkisofs $common_mkisofs_options -o $live_iso . + ) + + # also make compressed version, helps people downloading test images. + lzma -v <$live_iso >$live_iso.lzma + + # make checksums + # and symlinks with short names (potentially used in /etc/fstab). + for ext in "" .lzma; do + rm -f $prefix.iso$ext $prefix.iso$ext.md5 $prefix.iso$ext.sha256 + + (cd $target && md5sum `basename $live_iso$ext`) >$live_iso$ext.md5 + (cd $target && sha256sum `basename $live_iso$ext`) >$live_iso$ext.sha256 + + ln -s `basename $live_iso$ext` $prefix.iso$ext + ln -s `basename $live_iso`$ext.md5 $prefix.iso$ext.md5 + ln -s `basename $live_iso`$ext.sha256 $prefix.iso$ext.sha256 + + ls -l $live_iso$ext + done +} + + +# main program. + +$makelive && MAKELIVE + +rm -rf $work diff --git a/Master/tlpkg/bin/tl-update-install-pkg b/Master/tlpkg/bin/tl-update-install-pkg new file mode 100755 index 00000000000..44b1e38f1b5 --- /dev/null +++ b/Master/tlpkg/bin/tl-update-install-pkg @@ -0,0 +1,192 @@ +#!/usr/bin/env perl +# $Id$ +# +# Copyright 2008 Reinhard Kotucha, Norbert Preining +# This file is licensed under the GNU General Public License version 2 +# or any later version. + +# This script creates the zip (everything) and tgz (omits windows) +# archives to do a network install. Runs from cron. + +BEGIN { + $^W = 1; + my $me=$0; + $thisdir=`pwd`; + chomp ($thisdir); + if ($me=~m!/!) { + ($::installerdir=$me)=~s!(.*)/.*$!$1/../..!; + } else { + $::installerdir='../..'; + } + chdir $installerdir or die "can't chdir \"$installerdir\".\n"; + $installerdir=`pwd`; + chomp ($installerdir); + unshift (@INC, "$::installerdir/tlpkg"); +} + +use TeXLive::TLUtils qw(mkdirhier copy get_system_tmpdir info); +use TeXLive::TLPDB; +use TeXLive::TLPOBJ; +use Getopt::Long; +$Getopt::Long::autoabbrev=0; + +$opt_help=0; +$opt_verbose=0; +$opt_outputdir=0; + +sub usage +{ + print <<'EOF'; +Usage: + tl-make-install-pkg [-h|--help] [-v|--verbose] -o|--outputdir=dir + + tl-make-install-pkg generates a .tar.gz file for Unix and a .zip file + for all systems containing all the files needed to install TeX Live + from the network. + + Options: + -h|--help Print this message. + -o|--outputdir Target directory. Must exist and be writable. + -v|--verbose Extra messages. +EOF +; + exit 0; +} + +usage if (@ARGV<1); + +TeXLive::TLUtils::process_logging_options(); +GetOptions( + "verbose|v", + "outputdir|o=s", + "help|h") or usage; + +usage if $opt_help; + +### determine directories. + +my $sys_tmp=get_system_tmpdir or die "No system TMPDIR found."; +my $tmpdir="$sys_tmp/install-tl-$$"; +my $inst_tmp="$sys_tmp/install-tl-$$/install-tl"; +my $outputdir="$opt_outputdir"; +$outputdir="$thisdir/$outputdir" unless ($outputdir=~m!^/!); + +### cleanup. + +my @signals=qw(HUP INT ILL FPE SEGV TERM ABRT QUIT BUS PIPE); + +sub cleanup { + if (-d "$tmpdir") { + system('rm', '-rf', "$tmpdir"); + } +} + +foreach my $signal (@signals) { + $SIG{"$signal"}=\&cleanup; +} + +### create directories. + +die "$tmpdir already exists.\n" if (-d "$tmpdir"); + +mkdir "$tmpdir" or die "Can't mkdir \"$tmpdir\".\n"; +mkdir "$inst_tmp" or die "Can't mkdir \"$inst_tmp\".\n"; + +if ($opt_verbose) { + info("thisdir: \"$thisdir\"\n"); + info("installerdir: \"$installerdir\"\n"); + info("sys_tmp: \"$sys_tmp\"\n"); + info("tmpdir: \"$tmpdir\"\n"); + info("inst_tmp: \"$inst_tmp\"\n"); + info("outputdir: \"$outputdir\"\n"); +} + +die "outputdir \"$outputdir\" dosn't exist.\n" unless (-d "$outputdir"); +die "outputdir \"$outputdir\" is not writable.\n" unless (-w "$outputdir"); + +### read TLPDB and extract files + +my $tlpdb = TeXLive::TLPDB->new ("root" => "$installerdir"); +die("Cannot find tlpdb in $installerdir!\n") unless defined($tlpdb); +my $tlp = $tlpdb->get_package("00texlive.installer"); +die("Cannot find package 00texlive.installer in ${installerdir}'s texlive.tlpdb\n") unless defined($tlp); + +my $tlpinfra = $tlpdb->get_package("texlive.infra"); +die("Cannot find package texlive.infra in ${installerdir}'s texlive.tlpdb\n") unless defined($tlp); + + +my @unix; +push @unix, $tlp->runfiles; +push @unix, $tlpinfra->runfiles; +push @unix, $tlp->docfiles; +my %tlpbin = %{$tlp->binfiles}; +foreach my $a (keys %tlpbin) { + next if ($a =~ m/win32/); + push @unix, @{$tlpbin{$a}}; +} +my @win32; +push @win32, @unix; +if (defined($tlpbin{"win32"})) { + push @win32, @{$tlpbin{"win32"}}; +} + +### copy files from the repository to tmpdir + +sub copy_files { + my ($dir, $file); + for (@_) { + if ($_ !~ m!/!) { + # file in the root, missing ./ + $_ = "./$_"; + } + ($dir, $file) = /^(.*)\/(.*)/; + mkdirhier "$inst_tmp/$dir"; + copy "$_", "$inst_tmp/$dir"; + } +} + +### create the .tar.gz and the .zip file + +sub make_zip +{ + my ($type) = @_; + info("making $type\n"); + + chdir ($tmpdir) || die "chdir($tmpdir) failed: $!"; + if ($type eq 'zip') { + system('zip', '-rq', 'install-tl.zip', 'install-tl'); + } else { + system('tar', '-czf', 'install-tl-unx.tar.gz', 'install-tl'); + } + chdir ($installerdir) || die "chdir($installerdir) failed: $!"; +} + +### copy generated files to outputdir + +sub install_zip +{ + info("installing to $outputdir\n"); + copy "$tmpdir/install-tl-unx.tar.gz", $outputdir; + system ('ls', '-l', "$outputdir/install-tl-unx.tar.gz"); + + copy "$tmpdir/install-tl.zip", $outputdir; + system ('ls', '-l', "$outputdir/install-tl.zip"); +} + +### main +copy_files (@unix); +make_zip 'tgz'; + +copy_files (@win32); +make_zip 'zip'; + +install_zip; + +cleanup; + +### Local Variables: +### perl-indent-level: 2 +### tab-width: 2 +### indent-tabs-mode: nil +### End: +# vim:set tabstop=2 expandtab: # diff --git a/Master/tlpkg/bin/tlpsrc2tlpdb b/Master/tlpkg/bin/tlpsrc2tlpdb index f0db6132b6f..e5145c0be7b 100755 --- a/Master/tlpkg/bin/tlpsrc2tlpdb +++ b/Master/tlpkg/bin/tlpsrc2tlpdb @@ -72,15 +72,9 @@ sub main info("$0: updating from tlpsrc ...\n"); my $tldb = TeXLive::TLPDB->new; - my $last = ""; my $src_count = 0; foreach my $f (@ARGV) { if ($opt_all) { # progress report - my $first = lc (substr ($f, 0, 1)); - if ($first ne $last) { - print STDERR "$first "; - $last = $first; - } $src_count++; } my $tlsrc = new TeXLive::TLPSRC; @@ -95,7 +89,7 @@ sub main # split bin packages off if (not($opt_nobinsplit)) { # packages which have already a .win32 extension or the - # 00texlive.something package are NOT spit, never! + # 00texlive.something package are NOT split, never! if ( ($tlp->name !~ m/\.win32/) && ($tlp->name !~ m/^00texlive\./) ) { my @binobjs = $tlp->split_bin_package; foreach (@binobjs) { diff --git a/Master/tlpkg/tlpsrc/00texlive.core.tlpsrc b/Master/tlpkg/tlpsrc/00texlive.core.tlpsrc index af51907123e..038c2eebf21 100644 --- a/Master/tlpkg/tlpsrc/00texlive.core.tlpsrc +++ b/Master/tlpkg/tlpsrc/00texlive.core.tlpsrc @@ -10,7 +10,6 @@ longdesc 00texlive-installation.config(.tlpsrc) runpattern f README* runpattern d readme.html runpattern f LICENSE* -runpattern f COPYING runpattern f index.html runpattern f texmf/README runpattern f texmf-dist/README -- cgit v1.2.3