summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2018-06-04 23:45:50 +0000
committerNorbert Preining <preining@logic.at>2018-06-04 23:45:50 +0000
commit3eb56a19cf26eb482aad1f5319710c7061f7257f (patch)
tree6779461bf0afa2c490e03ce3cfcfe7569f85960a /Master/texmf-dist
parentcb3ce8c3795a0151eb6b98d55954a5fd37d20579 (diff)
fmtutil: use copy instead of move for selinux
git-svn-id: svn://tug.org/texlive/trunk@47925 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/fmtutil.pl18
1 files changed, 11 insertions, 7 deletions
diff --git a/Master/texmf-dist/scripts/texlive/fmtutil.pl b/Master/texmf-dist/scripts/texlive/fmtutil.pl
index 606eb34f854..0b82a60046c 100755
--- a/Master/texmf-dist/scripts/texlive/fmtutil.pl
+++ b/Master/texmf-dist/scripts/texlive/fmtutil.pl
@@ -719,21 +719,25 @@ sub rebuild_one_format {
TeXLive::TLUtils::mkdirhier($destdir);
- if (!File::Copy::move( $logfile, "$destdir/$logfile")) {
- print_deferred_error("Cannot move $logfile to $destdir.\n");
+ # here and in the following we use copy instead of move
+ # to make sure that in SElinux enabled cases the rules of
+ # the destination directory are applied.]
+ # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900580
+ if (!File::Copy::copy( $logfile, "$destdir/$logfile")) {
+ print_deferred_error("Cannot copy $logfile to $destdir.\n");
}
if ($opts{'recorder'}) {
# the recorder output is used by check-fmttriggers to determine
# package dependencies for each format. Unfortunately omega-based
# engines gratuitiously changed the extension from .fls to .ofl.
my $recfile = $fmt . ($fmt =~ m/^(aleph|lamed)$/ ? ".ofl" : ".fls");
- if (!File::Copy::move( $recfile, "$destdir/$recfile")) {
- print_deferred_error("Cannot move $recfile to $destdir.\n");
+ if (!File::Copy::copy( $recfile, "$destdir/$recfile")) {
+ print_deferred_error("Cannot copy $recfile to $destdir.\n");
}
}
my $destfile = "$destdir/$fmtfile";
- if (File::Copy::move( $fmtfile, $destfile )) {
+ if (File::Copy::copy( $fmtfile, $destfile )) {
print_info("$destfile installed.\n");
#
# original fmtutil.sh did some magic trick for mplib-luatex.mem
@@ -780,10 +784,10 @@ sub rebuild_one_format {
return $FMT_SUCCESS;
} else {
- print_deferred_error("Cannot move $fmtfile to $destfile.\n");
+ print_deferred_error("Cannot copy $fmtfile to $destfile.\n");
if (-f $destfile) {
# remove the empty file possibly left over if near-full file system.
- print_verbose("Removing partial file after move failure: $destfile\n");
+ print_verbose("Removing partial file after copy failure: $destfile\n");
unlink($destfile)
|| print_deferred_error("unlink($destfile) failed: $!\n");
}