OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-69-gd0805d7
Gerrit Code Review
gerrit@openafs.org
Thu, 8 Mar 2018 22:19:54 -0500
The following commit has been merged in the master branch:
commit d0805d72b7a48dcaa7abe1aea136a8cd963d76c2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Mar 7 13:11:03 2018 -0600
Avoid empty libtool -export-symbols-regex pattern
Currently, in LT_LDLIB_shlib_missing, we construct our
-export-symbols-regex pattern like so (with some escaping):
"($(sed -e 's/^/^/' -e 's/$/$/' xxx.sym | tr '\n' '|' | sed -e 's/|$//'))"
The idea is that for a .sym file consisting of, for example:
foo
bar
We then generate a regex like (^foo$|^bar$). However, since the 'tr'
removes all newlines, the line given to the last 'sed' in the pipeline
has no trailing newline. On some systems, such as Solaris, this causes
sed to not output anything at all, resulting in a regex pattern of
just "()".
For example:
# on Debian
$ echo -n foo | sed -e 's/foo/bar/'
bar$
# on Solaris
$ echo -n foo | sed -e 's/foo/bar/'
$
To avoid this, we can change the sed pipeline to not remove the
newlines until the very end. Change the way we construct our regex to
this instead:
"($(sed -e 's/^/^/' -e 's/$/$|/' -e '$ s/|$//' xxx.sym | tr -d '\n'))"
So the sed removes the extra '|' in the last element by looking at the
last line, instead of looking at the end of the line after the 'tr'
conversion.
Change-Id: Id382132f6b400bf961dbaa52138a9abd0168118d
Reviewed-on: https://gerrit.openafs.org/12944
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/config/Makefile.config.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--
OpenAFS Master Repository