diff --git a/libguestfs-find-requires.sh b/libguestfs-find-requires.sh index 252d581..56cd9fe 100755 --- a/libguestfs-find-requires.sh +++ b/libguestfs-find-requires.sh @@ -1,12 +1,5 @@ #!/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 @@ -17,23 +10,21 @@ files=`sed "s/['\"]/\\\&/g"` # Use ordinary find-requires first. echo $files | tr [:blank:] '\n' | $original_find_requires -# Is supermin.d/hostfiles included in the list of files? -hostfiles=`echo $files | tr [:blank:] '\n' | grep 'supermin\.d/hostfiles$'` +# Is supermin.d/packages included in the list of files? +packages=`echo $files | tr [:blank:] '\n' | grep 'supermin\.d/packages$'` -if [ -z "$hostfiles" ]; then +if [ -z "$packages" ]; then exit 0 fi -# Generate extra requires for libraries listed in hostfiles. -sofiles=`grep 'lib.*\.so\.' $hostfiles | fgrep -v '*'` -for f in $sofiles; do - if [ -f "$f" ]; then - if [[ "$f" =~ (/usr)?/lib64/([^/]*)$ ]]; then - echo "${BASH_REMATCH[2]}()(64bit)" - elif [[ "$f" =~ (/usr)?/lib/([^/]*)$ ]]; then - echo "${BASH_REMATCH[2]}" - else - echo "$f" - fi - fi -done +# Generate one 'Requires:' line for each package listed in packages. +cat $packages + +# We need to add library dependencies required by guestfsd (which +# is in the appliance). +guestfsd=$RPM_BUILD_ROOT/usr/sbin/guestfsd +if [ ! -x $guestfsd ]; then + echo "$0: cannot find guestfsd" >&2 + exit 1 +fi +echo $guestfsd | $original_find_requires diff --git a/libguestfs.spec b/libguestfs.spec index 6d8434a..bc35775 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -19,7 +19,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.26.1 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Source and patches. @@ -1170,8 +1170,10 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs %changelog -* Wed Apr 23 2014 Richard W.M. Jones - 1:1.26.1-1 +* Wed Apr 23 2014 Richard W.M. Jones - 1:1.26.1-2 - New upstream version 1.26.1. +- Backport the custom dependency generator from Rawhide. + Dependencies were not being generated correctly (thanks dkliban). * Thu Mar 27 2014 Richard W.M. Jones - 1:1.26.0-1 - New stable branch version 1.26.0.