wok-6.x diff manserver/stuff/manserver-1.08-add-xz.patch @ rev 24867

updated lvm2, lvm2-dev, libdevmapper and libdevmapper-dev (2.03.08 -> 2.03.15)
author Hans-G?nter Theisgen
date Wed Mar 30 17:27:13 2022 +0100 (2022-03-30)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/manserver/stuff/manserver-1.08-add-xz.patch	Wed Mar 30 17:27:13 2022 +0100
     1.3 @@ -0,0 +1,87 @@
     1.4 +--- manServer.pl.orig
     1.5 ++++ manServer.pl
     1.6 +@@ -175,7 +175,7 @@
     1.7 + 		listDir($request);
     1.8 + 		$processed = 1;
     1.9 + 	}
    1.10 +-	elsif (-f $request || -f "$request.gz" || -f "$request.bz2")
    1.11 ++	elsif (-f $request || -f "$request.gz" || -f "$request.bz2" || -f "$request.xz")
    1.12 + 	{
    1.13 + 		# Only allow fully specified files if they're in our manpath
    1.14 + 		foreach $md (@manpath)
    1.15 +@@ -270,7 +270,7 @@
    1.16 + 				foreach $f (@files)
    1.17 + 				{
    1.18 + 					next if ($f eq "." || $f eq ".." || $f !~ m/\./);
    1.19 +-					$f =~ s/\.(gz|bz2)$//;
    1.20 ++					$f =~ s/\.(gz|bz2|xz)$//;
    1.21 + 					# ($name) = ($f =~ m,/([^/]*)$,);
    1.22 + 					print OUT "<A HREF=\"$root$request/$f\">$f</A>&nbsp;\n";
    1.23 + 				}
    1.24 +@@ -322,6 +322,13 @@
    1.25 + 			$srcfile =~ m/^(.*)$/;
    1.26 + 			$srcfile = $1;	# untaint
    1.27 + 		}
    1.28 ++		elsif (-f "$file.xz")
    1.29 ++		{
    1.30 ++			$zfile = "$file.xz";
    1.31 ++			$srcfile = "/usr/bin/xzcat $zfile |";
    1.32 ++			$srcfile =~ m/^(.*)$/;
    1.33 ++			$srcfile = $1;	# untaint
    1.34 ++		}
    1.35 + 	}
    1.36 + 	print LOG "man2html $file\n";
    1.37 + 	$foundNroffTag = 0;
    1.38 +@@ -2823,7 +2830,7 @@
    1.39 + 	@multipleMatches = ();
    1.40 + 
    1.41 + 	$file = $_[0];
    1.42 +-	return $file if (-f $file || -f "$file.gz" || -f "$file.bz2");
    1.43 ++	return $file if (-f $file || -f "$file.gz" || -f "$file.bz2" || -f "$file.xz");
    1.44 + 
    1.45 + 	# Search the path for the requested man page, which may be of the form:
    1.46 + 	# "/usr/man/man1/ls.1", "ls.1" or "ls".
    1.47 +@@ -2837,7 +2844,7 @@
    1.48 + 		{
    1.49 + 			$dir = $md;
    1.50 + 			$file = "$dir/man$sect/$page.$sect";
    1.51 +-			push(@multipleMatches, $file) if (-f $file || -f "$file.gz" || -f "$file.bz2");
    1.52 ++			push(@multipleMatches, $file) if (-f $file || -f "$file.gz" || -f "$file.bz2" || -f "$file.xz");
    1.53 + 		}
    1.54 + 	}
    1.55 + 	else
    1.56 +@@ -2855,13 +2862,13 @@
    1.57 + 	{
    1.58 + 		($s) = ($dir =~ m/man([0-9A-Za-z]+)$/);
    1.59 + 		$file = "$dir/$page.$s";
    1.60 +-		push(@multipleMatches, $file) if (-f $file || -f "$file.gz" || -f "$file.bz2");
    1.61 ++		push(@multipleMatches, $file) if (-f $file || -f "$file.gz" || -f "$file.bz2" || -f "$file.xz");
    1.62 + 		$file = "$dir/$request";
    1.63 +-		push(@multipleMatches, $file) if (-f $file || -f "$file.gz" || -f "$file.bz2");
    1.64 ++		push(@multipleMatches, $file) if (-f $file || -f "$file.gz" || -f "$file.bz2" || -f "$file.xz");
    1.65 + 		if ($sect && "$page.$sect" ne $request)
    1.66 + 		{
    1.67 + 			$file = "$dir/$page.$sect";
    1.68 +-			push(@multipleMatches, $file) if (-f $file || -f "$file.gz" || -f "$file.bz2");
    1.69 ++			push(@multipleMatches, $file) if (-f $file || -f "$file.gz" || -f "$file.bz2" || -f "$file.xz");
    1.70 + 		}
    1.71 + 	}
    1.72 + 	if (@multipleMatches == 1)
    1.73 +@@ -2882,7 +2889,7 @@
    1.74 + 		{
    1.75 + 			if ($f =~ m/^$page\./)
    1.76 + 			{
    1.77 +-				$f =~ s/\.(gz|bz2)$//;
    1.78 ++				$f =~ s/\.(gz|bz2|xz)$//;
    1.79 + 				push(@multipleMatches, "$dir/$f");
    1.80 + 			}
    1.81 + 		}
    1.82 +@@ -2908,7 +2915,7 @@
    1.83 + 			{
    1.84 + 				next if ($f eq "." || $f eq ".." || $f !~ m/\./);
    1.85 + 				next unless ("$dir/$f" =~ m/perl/);
    1.86 +-				$f =~ s/\.(gz|bz2)$//;
    1.87 ++				$f =~ s/\.(gz|bz2|xz)$//;
    1.88 + 				($name) = ($f =~ m,(.+)\.[^.]*$,);
    1.89 + 				$perlPages{$name} = "$dir/$f";
    1.90 + 			}