diff options
Diffstat (limited to 'Master/tlpkg/bin/tl-update-images')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-images | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/Master/tlpkg/bin/tl-update-images b/Master/tlpkg/bin/tl-update-images index 5266054eac7..d3c018b691e 100755 --- a/Master/tlpkg/bin/tl-update-images +++ b/Master/tlpkg/bin/tl-update-images @@ -113,18 +113,17 @@ MAKEINST () cp $mydir/tl-prune-platforms $imgdir/tlpkg/bin $imgdir/tlpkg/bin/tl-prune-platforms $prune >/tmp/imgprune + # due to the pruning, must re-checksum and re-sign the tlpdb in the image. + md5sum $imgdir/tlpkg/texlive.tlpdb >$imgdir/tlpkg/texlive.tlpdb.md5 \ + || exit 1 + sha512sum $imgdir/tlpkg/texlive.tlpdb >$imgdir/tlpkg/texlive.tlpdb.sha512 \ + || exit 1 + $master/tlpkg/bin/tl-sign-file $imgdir/tlpkg/texlive.tlpdb.sha512 \ + || exit 1 + # some files we don't want in the image after all. rm -rf $imgdir/doc.html $imgdir/tlpkg/texlive.tlpdb.xz $imgdir/tlpkg/bin - # since prune-platforms changes the tlpdb file, must remake checksums. - # (before making the iso). redundantly remove files being created. - rm -f $prefix.iso.md5; md5sum `basename $iso` >$iso.md5 - rm -f $prefix.iso.sha512; sha512sum `basename $iso` >$iso.sha512 - - # for md5 and sha512, adjust the embedded filename for generic files. - rm -f $prefix.iso.md5; sed "s,-$D,," $iso.md5 >$prefix.iso.md5 - rm -f $prefix.iso.sha512; sed "s,-$D,," $iso.sha512 >$prefix.iso.sha512 - # the actual iso creation. cd $imgdir || exit 1 cmd="$mkisofs $common_mkisofs_options -o $iso ." @@ -139,17 +138,36 @@ MAKEINST () cd $target || exit 1 rm -rf $imgdir - # signed versioned and generic files. + # since prune-platforms changes the tlpdb file, must remake checksums. + # (before making the iso). redundantly remove files being created. + rm -f $prefix.iso.md5; md5sum `basename $iso` >$iso.md5 || exit 1 + rm -f $prefix.iso.sha512; sha512sum `basename $iso` >$iso.sha512 || exit 1 + + # for md5 and sha512, adjust the embedded filename for generic files. + rm -f $prefix.iso.md5; sed "s,-$D,," $iso.md5 >$prefix.iso.md5 + rm -f $prefix.iso.sha512; sed "s,-$D,," $iso.sha512 >$prefix.iso.sha512 + + # sign both the versioned and generic checksums, separately. rm -f $iso.sha512.asc - $master/tlpkg/bin/tl-sign-file $iso.sha512 + $master/tlpkg/bin/tl-sign-file $iso.sha512 || exit 1 # rm -f $prefix.iso.sha512.asc - $master/tlpkg/bin/tl-sign-file $prefix.iso.sha512 + $master/tlpkg/bin/tl-sign-file $prefix.iso.sha512 || exit 1 # symlinks with short name (potentially used in /etc/fstab). ln -s `basename $iso` $prefix.iso # with year ln -s `basename $iso` $target/$NAME.iso # no year + # at the end, all the files should be non-empty. + all_ok=true + for f in *.md5 *.sha512 *.asc *.iso; do + if test ! -s $f; then + echo "$0: MAKEINST: unexpected empty file: $f" >&2 + all_ok=false + fi + done + $all_ok || exit 1 # give up now if empty files + cd $origdir || exit 1 echo "-- `date` iso files:" ls -l $iso $iso.sha512 $iso.sha512.asc |