1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

security/fsh: Remove redundant escapes of ordinary characters

Makefile.in has a number of escapes (all following @ in the sed expression)
that only serve to stop a sed in the configure script from replacing them.
Escaping ordinary characters is considered undefined behavior by POSIX, and
the patch in bug #229925 aims to serve out errors for escaping of most
ordinary characters to reduce friction when some of these sequences are
given special meaning.

QA:
 * portlint: OK (minor warnings that should be addressed separately)
 * testport: OK (poudriere: 13.0-CURRENT and 12.0-RELEASE, amd64)
 * diffoscope: OK (only minor metadata changes to package)

PR:		240308
Approved by:	koobs (ports)
This commit is contained in:
Kyle Evans 2019-09-06 21:20:25 +00:00
parent c87672f391
commit ee6e10da70
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=511366
2 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,71 @@
--- Makefile.in.orig 2001-12-23 11:10:13 UTC
+++ Makefile.in
@@ -40,7 +40,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
-libexecdir = @libexecdir@
+libexecdir = @ac_libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
@@ -81,7 +81,7 @@ EXEEXT = @EXEEXT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
-PYTHON = @PYTHON@
+PYTHON = @PYTHON_CMD@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
@@ -576,16 +576,16 @@ uninstall-am: uninstall-binSCRIPTS uninstall-info-am \
starter: Makefile $(srcdir)/$(PYTHON_SCRIPT_TEMPLATE)
rm -f $@ $@.tmp
- sed -e 's%@\PYTHON@%$(PYTHON)%' \
- -e 's%@\pkgdatadir@%$(pkgdatadir)%' \
+ sed -e 's%@PYTHON@%$(PYTHON)%' \
+ -e 's%@pkgdatadir@%$(pkgdatadir)%' \
< $(srcdir)/$(PYTHON_SCRIPT_TEMPLATE) > $@.tmp
mv $@.tmp $@
fsh: fsh.in Makefile starter
rm -f $@ $@.tmp
cat starter > $@.tmp
- sed -e 's%@\PYTHON@%$(PYTHON)%' \
- -e 's%@\pkgdatadir@%$(pkgdatadir)%' \
+ sed -e 's%@PYTHON@%$(PYTHON)%' \
+ -e 's%@pkgdatadir@%$(pkgdatadir)%' \
< $(srcdir)/fsh.in >> $@.tmp
chmod +x $@.tmp
mv $@.tmp $@
@@ -593,8 +593,8 @@ fsh: fsh.in Makefile starter
fshd: fshd.in Makefile starter
rm -f $@ $@.tmp
cat starter > $@.tmp
- sed -e 's%@\PYTHON@%$(PYTHON)%' \
- -e 's%@\pkgdatadir@%$(pkgdatadir)%' \
+ sed -e 's%@PYTHON@%$(PYTHON)%' \
+ -e 's%@pkgdatadir@%$(pkgdatadir)%' \
< $(srcdir)/fshd.in >> $@.tmp
chmod +x $@.tmp
mv $@.tmp $@
@@ -602,15 +602,15 @@ fshd: fshd.in Makefile starter
in.fshd: in.fshd.in Makefile starter
rm -f $@ $@.tmp
cat starter > $@.tmp
- sed -e 's%@\PYTHON@%$(PYTHON)%' \
- -e 's%@\pkgdatadir@%$(pkgdatadir)%' \
+ sed -e 's%@PYTHON@%$(PYTHON)%' \
+ -e 's%@pkgdatadir@%$(pkgdatadir)%' \
< $(srcdir)/in.fshd.in >> $@.tmp
chmod +x $@.tmp
mv $@.tmp $@
fcp: fcp.sh Makefile
rm -f $@ $@.tmp
- sed -e 's%@\libexecdir@%$(libexecdir)%g' \
+ sed -e 's%@libexecdir@%$(libexecdir)%g' \
< $(srcdir)/fcp.sh > $@.tmp
chmod +x $@.tmp
mv $@.tmp $@

View File

@ -0,0 +1,20 @@
--- configure.orig 2001-12-23 11:10:13 UTC
+++ configure
@@ -2732,7 +2732,7 @@ s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
+s,@ac_libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
@@ -2778,7 +2778,7 @@ s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@DEPDIR@,$DEPDIR,;t t
s,@DEFAULT_FSHD_TIMEOUT@,$DEFAULT_FSHD_TIMEOUT,;t t
-s,@PYTHON@,$PYTHON,;t t
+s,@PYTHON_CMD@,$PYTHON,;t t
s,@PYTHON_SCRIPT_TEMPLATE@,$PYTHON_SCRIPT_TEMPLATE,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t