diff options
| author | Pavel Raiskup <praiskup@redhat.com> | 2013-04-26 17:38:34 +0200 |
|---|---|---|
| committer | Pavel Raiskup <praiskup@redhat.com> | 2013-04-26 19:07:00 +0200 |
| commit | b6164b7e355ea9a11948fe24e6196590ed3d0c2c (patch) | |
| tree | df05b9f7fe4024a3d6cef37f00f7b1575aa7367e | |
| parent | ff35f7147754313eeec7703ac46c00a56195b2e8 (diff) | |
libtool: speedup execute mode
Pre-filter sed's input by dd to avoid long delays and unlimited memory
consumption.
Version: 2.4.2-14
Resolves: #636045
| -rw-r--r-- | libtool-2.4.2-dd-execute-mode.patch | 43 | ||||
| -rw-r--r-- | libtool.spec | 11 |
2 files changed, 53 insertions, 1 deletions
diff --git a/libtool-2.4.2-dd-execute-mode.patch b/libtool-2.4.2-dd-execute-mode.patch new file mode 100644 index 0000000..fad876a --- /dev/null +++ b/libtool-2.4.2-dd-execute-mode.patch @@ -0,0 +1,43 @@ +diff --git a/libltdl/config/ltmain.sh b/libltdl/config/ltmain.sh +index 63ae69d..36625c7 100644 +--- a/libltdl/config/ltmain.sh ++++ b/libltdl/config/ltmain.sh +@@ -82,6 +82,7 @@ PROGRAM=libtool + PACKAGE=libtool + VERSION=2.4.2 + TIMESTAMP="" ++: ${DD=dd} + package_revision=1.3337 + + # Be Bourne compatible +@@ -1224,6 +1225,21 @@ func_enable_tag "$optarg" + ## Main. ## + ## ----------- ## + ++# func_try_sizelim file n ++# try to write at most the first N bytes from FILE to the standard output when ++# possible, otherwise put whole file ++func_try_sizelim () ++{ ++ if test -n "$DD"; then ++ $DD if="$1" bs=$2 count=1 2>/dev/null ++ if test $? -eq 127; then ++ cat "$1" 2>/dev/null ++ fi ++ else ++ cat "$1" 2>/dev/null ++ fi ++} ++ + # func_lalib_p file + # True iff FILE is a libtool `.la' library or `.lo' object file. + # This function is only a basic sanity check; it will hardly flush out +@@ -1231,7 +1247,7 @@ func_enable_tag "$optarg" + func_lalib_p () + { + test -f "$1" && +- $SED -e 4q "$1" 2>/dev/null \ ++ func_try_sizelim "$1" 4096 | $SED -e 4q 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + } + diff --git a/libtool.spec b/libtool.spec index ac086d3..e4af3ab 100644 --- a/libtool.spec +++ b/libtool.spec @@ -17,6 +17,13 @@ Patch1: libtool-2.4.2-TEMPORARY-disable-gcj-tests.patch # fixed in next release. Patch2: libtool-2.4.2-tar-no-owner.patch +# Do not hang too long on sed +# ~> #636045 +# ~> Downstream (we don't care much about portability) +# ~> upstream proposal: +# http://lists.gnu.org/archive/html/bug-libtool/2013-04/msg00005.html +Patch3: libtool-2.4.2-dd-execute-mode.patch + Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -80,6 +87,7 @@ Static libraries and header files for development with ltdl. %patch0 -p1 -b .rpath %patch1 -p1 -b .temp-disable-gcj-test %patch2 -p1 -b .tar-no-same-owner +%patch3 -p1 -b .dd-exec-mode %build @@ -159,8 +167,9 @@ fi %{_libdir}/libltdl.so %changelog -* Wed Apr 24 2013 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-14 +* Fri Apr 26 2013 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-14 - allow root to copy files into NFS in libtoolize (#740079) +- pre-filter sed's input by dd (#636045) * Thu Mar 14 2013 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-13 - do not BR gcc-java in RHEL (by dmach) |
