tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: broken packages for 2013q2
On Sun, Jun 23, 2013 at 06:19:58PM +0700, Robert Elz wrote:
> Date: Sun, 23 Jun 2013 07:11:28 +0000
> From: David Holland <dholland-pkgtech%NetBSD.org@localhost>
> Message-ID: <20130623071128.GA21935%netbsd.org@localhost>
>
> | There's also a couple packages that have been broken on perl stuff
> | since 5.16.
>
> Could someone who knows (current) perl perhaps take a look at
> graphics/magicpoint.
>
> It contains a perl script (mpgembed) that has been giving perl warnings
> for a couple of versions of perl now (but continued working) but now
> doesn't function at all...
>
> It is just a small script, and the actual functional part of it won't be
> an issue - the problems are just perl syntax & getopt.
Nice catch, same issue elsewhere.
Just committed somewhat minimal fixes to OpenBSD so it at least starts again
(well, for me, that includes using 3 parameters open on filenames to avoid
security injection issues).
--- mgpembed.pl.in.orig Tue Jan 5 04:44:00 1999
+++ mgpembed.pl.in Sun Jun 23 15:15:34 2013
@@ -16,15 +16,16 @@ if (! -x $gzip || ! -x $uuencode) {
die "external program not found. manual configuration required.\n"
}
-require 'getopts.pl';
+use Getopt::Std;
+use subs (qw(usage readfile));
# specify suffixes we should gzip files before uuencoding
@gzipsuffix = (".ps", ".xbm");
-do Getopts('o:');
+getopts('o:');
if ($#ARGV != 0) {
- do usage();
+ usage();
# NOTREACHED
}
@@ -37,14 +38,14 @@ if (defined($opt_o)) {
die "$outfname already exists\n" if -f $outfname;
die "$outfname is specified for both input/output\n"
if ($outfname eq $infname);
- open(OUT, "> $outfname") || die "Can not open $outfname: $!";
+ open(OUT, ">", $outfname) || die "Can not open $outfname: $!";
} else {
open(OUT, ">& STDOUT");
}
# read the file, process %include directives
-do readfile($infname, 'INPUT000');
+readfile($infname, 'INPUT000');
# append embedded files using %embed/%endembed directives
@@ -76,10 +77,10 @@ foreach $efile (keys %files) {
close(OUT);
sub readfile {
- local($filename, $input) = @_;
- local($fname, $fname0);
+ my($filename, $input) = @_;
+ my($fname, $fname0);
$input++;
- open($input, $filename) || die "Can not open $filename: $!\n";
+ open($input, '<', $filename) || die "Can not open $filename: $!\n";
while (<$input>) {
if (/^%%/) {
print OUT;
@@ -116,7 +117,7 @@ sub readfile {
$incfname = $1;
}
print OUT "\%\%\%\%\%\%\%\%\%\%INCLUDE $incfname\n";
- do readfile($incfname, $input);
+ readfile($incfname, $input);
print OUT "\%\%\%\%\%\%\%\%\%\%INCLUDE-END $incfname\n";
} else {
print OUT;
@@ -128,5 +129,5 @@ sub readfile {
sub usage {
print STDERR "usage: mgpembed [-o outfile ] mgpfile\n";
- exit -1;
+ exit 1;
}
Home |
Main Index |
Thread Index |
Old Index