[libguestfs] Update libguestfs-find-requires to generate ordinary lib dependencies.
Richard W.M. Jones
rjones at fedoraproject.org
Thu Aug 2 18:32:53 UTC 2012
commit fde3bcaf2a62b4389c8ebf9d3cc738ebf118aba1
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Aug 2 19:31:26 2012 +0100
Update libguestfs-find-requires to generate ordinary lib dependencies.
Note the following important comment in the updated script:
<quote>
Note this script is *ONLY* applicable to Fedora 17+ (ie. with UsrMove)
since we now assume that /usr/lib{,64} and /lib{,64} are the same
directory and hence that:
Requires: libfoo.so.1 <=> /usr/lib/libfoo.so.1 exists
Requires: libfoo.so.1()(64bit) <=> /usr/lib64/libfoo.so.1 exists
</quote>
libguestfs-find-requires.sh | 17 ++++++++++++++---
libguestfs.spec | 5 +++--
2 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/libguestfs-find-requires.sh b/libguestfs-find-requires.sh
index 3b34cf9..595df2f 100755
--- a/libguestfs-find-requires.sh
+++ b/libguestfs-find-requires.sh
@@ -1,5 +1,12 @@
-#!/bin/sh -
+#!/bin/bash -
# Additional custom requires for libguestfs package.
+#
+# Note this script is *ONLY* applicable to Fedora 17+ (ie. with UsrMove)
+# since we now assume that /usr/lib{,64} and /lib{,64} are the same
+# directory and hence that:
+#
+# Requires: libfoo.so.1 <=> /usr/lib/libfoo.so.1 exists
+# Requires: libfoo.so.1()(64bit) <=> /usr/lib64/libfoo.so.1 exists
original_find_requires="$1"
shift
@@ -18,9 +25,13 @@ if [ -z "$hostfiles" ]; then
fi
# Generate extra requires for libraries listed in hostfiles.
-sofiles=`grep 'lib.*\.so\.' $hostfiles | fgrep -v '*' | sed 's|^\.||'`
+sofiles=`grep 'lib.*\.so\.' $hostfiles | fgrep -v '*'`
for f in $sofiles; do
if [ -f "$f" ]; then
- echo "$f"
+ if [[ "$f" =~ /lib64/(.*) ]]; then
+ echo "${BASH_REMATCH[1]}()(64bit)"
+ elif [[ "$f" =~ /lib/(.*) ]]; then
+ echo "${BASH_REMATCH[1]}"
+ fi
fi
done
diff --git a/libguestfs.spec b/libguestfs.spec
index 1b6137e..c0acab3 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -22,7 +22,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
Version: 1.19.28
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: Development/Libraries
URL: http://libguestfs.org/
@@ -997,8 +997,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
%changelog
-* Thu Aug 02 2012 Richard W.M. Jones <rjones at redhat.com> - 1:1.19.28-1
+* Thu Aug 02 2012 Richard W.M. Jones <rjones at redhat.com> - 1:1.19.28-2
- New upstream version 1.19.28.
+- Update libguestfs-find-requires to generate ordinary lib dependencies.
* Wed Aug 1 2012 Richard W.M. Jones <rjones at redhat.com> - 1:1.19.27-2
- Disable tests because of RHBZ#844485.
More information about the scm-commits
mailing list