3 # Copyright (C) 2011 Red Hat Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 # https://bugzilla.redhat.com/show_bug.cgi?id=727178
20 # Check that all binaries that we ship in the appliance contain
21 # corresponding libraries.
26 guestfish=../fish/guestfish
27 output=rhbz727178.output
29 rm -f binaries.tmp $output
31 eval `$guestfish -a /dev/null --listen`
33 $guestfish --remote -- run
34 $guestfish --remote -- debug binaries "" |
35 grep -E '^/(bin|sbin|usr/bin|usr/sbin|usr/libexec)/' > binaries.tmp
39 $guestfish --remote -- -debug ldd $ex
40 done < binaries.tmp > $output
42 if grep -E '\bnot found\b|undefined symbol' $output; then
43 echo "Error: some libraries are missing from the appliance."
44 echo "See" $(pwd)/$output
45 echo "for the complete output."
49 rm binaries.tmp $output