diff options
author | Ulrich Müller <ulm@gentoo.org> | 2015-06-25 23:00:13 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2015-06-25 23:00:13 +0200 |
commit | 561364d295089631f94dd6ed593742bfadd6bb57 (patch) | |
tree | 6df27a6433e235351525248e20ef1a233994a414 | |
parent | Erase cleartext passwords from memory, bug 482588. (diff) | |
download | ulm-561364d295089631f94dd6ed593742bfadd6bb57.tar.gz ulm-561364d295089631f94dd6ed593742bfadd6bb57.tar.bz2 ulm-561364d295089631f94dd6ed593742bfadd6bb57.zip |
Replace broken perl script by sed, bug 553148.
-rw-r--r-- | patchsets/skey/1.1.5/12_all_fixpathscmd.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/patchsets/skey/1.1.5/12_all_fixpathscmd.patch b/patchsets/skey/1.1.5/12_all_fixpathscmd.patch new file mode 100644 index 0000000..d4bd421 --- /dev/null +++ b/patchsets/skey/1.1.5/12_all_fixpathscmd.patch @@ -0,0 +1,73 @@ +https://bugs.gentoo.org/553148 +Replace broken perl script by sed. + +--- skey-1.1.5-orig/Makefile.in ++++ skey-1.1.5/Makefile.in +@@ -40,13 +40,11 @@ + CATMAN = skey.0 skeyinit.0 skeyinfo.0 skeyaudit.0 skeyprune.0 + MANPAGES = @MANTYPE@ + +-PATHSUBS = -D/etc/skeykeys=${sysconfdir}/skeykeys -D/usr/bin/perl=${PERL} +- +-FIXPATHSCMD = $(PERL) $(srcdir)/fixpaths $(PATHSUBS) ++FIXPATHSCMD = sed -i -e 's:/etc/skey/skeykeys:${sysconfdir}/skeykeys:g;s:/usr/bin/perl:${PERL}:g' + + HDRS= skey.h sha1.h + +-all: ${TARGETS} ${MANPAGES} ++all: ${TARGETS} ${SCRIPTS} ${MANPAGES} + + ${LIBOBJS}: config.h + +--- skey-1.1.5-orig/fixpaths 2001-05-10 16:10:49.000000000 +0000 ++++ skey-1.1.5/fixpaths 1970-01-01 00:00:00.000000000 +0000 +@@ -1,49 +0,0 @@ +-#!/usr/bin/perl -w +-# +-# fixpaths - substitute makefile variables into text files +- +- +-$usage = "Usage: $0 [-x<file dot-suffix>] [-Dstring=replacement] [[infile] ...]\n"; +- +-$ext="out"; +- +-if (!defined(@ARGV)) { die ("$usage"); } +- +-# read in the command line and get some definitions +-while ($_=$ARGV[0], /^-/) { +- if (/^-[Dx]/) { +- # definition +- shift(@ARGV); +- if ( /-D(.*)=(.*)/ ) { +- $def{"$1"}=$2; +- } elsif ( /-x\s*(\w+)/ ) { +- $ext=$1; +- } else { +- die ("$usage$0: error in command line arguments.\n"); +- } +- } else { +- die ("$usage$0: unknown option '-".$ARGV[0][1]."'\n"); +- } +-} # while parsing arguments +- +-if (!defined(%def)) { +- die ("$0: nothing to do - no substitutions listed!\n"); +-} +- +-for $f (@ARGV) { +- +- $f =~ /(.*\/)*(.*)$/; +- $of = $2.".$ext"; +- +- open(IN, "<$f") || die ("$0: input file $f missing!\n"); +- if (open(OUT, ">$of")) { +- while (<IN>) { +- for $s (keys(%def)) { +- s#$s#$def{$s}#; +- } # for $s +- print OUT; +- } # while <IN> +- } # if (outfile open) +-} # for $f +- +-exit 0; |