Hello community, here is the log from the commit of package mkinitrd for openSUSE:13.1 checked in at 2013-10-29 09:28:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:13.1/mkinitrd (Old) and /work/SRC/openSUSE:13.1/.mkinitrd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mkinitrd" Changes: -------- --- /work/SRC/openSUSE:13.1/mkinitrd/mkinitrd.changes 2013-10-19 16:49:39.000000000 +0200 +++ /work/SRC/openSUSE:13.1/.mkinitrd.new/mkinitrd.changes 2013-10-29 09:28:31.000000000 +0100 @@ -1,0 +2,5 @@ +Sun Oct 27 21:24:20 CET 2013 - [email protected] + +- Resolve also library dependencies of libnss (bnc#847785) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.8.1/mkinitrd.changes new/mkinitrd-2.8.1/mkinitrd.changes --- old/mkinitrd-2.8.1/mkinitrd.changes 2013-10-17 11:13:41.000000000 +0200 +++ new/mkinitrd-2.8.1/mkinitrd.changes 2013-10-27 21:29:16.000000000 +0100 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Sun Oct 27 21:24:20 CET 2013 - [email protected] + +- Resolve also library dependencies of libnss (bnc#847785) + +------------------------------------------------------------------- Thu Oct 17 11:13:30 CEST 2013 - [email protected] - Version 2.8.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.8.1/scripts/setup-sharedlibs.sh new/mkinitrd-2.8.1/scripts/setup-sharedlibs.sh --- old/mkinitrd-2.8.1/scripts/setup-sharedlibs.sh 2013-10-17 11:13:41.000000000 +0200 +++ new/mkinitrd-2.8.1/scripts/setup-sharedlibs.sh 2013-10-27 21:29:16.000000000 +0100 @@ -26,7 +26,7 @@ # Resolve dynamic library dependencies. Returns a list of symbolic links # to shared objects and shared object files for the binaries in $*. shared_object_files() { - local CHROOT initrd_libs lib_files lib_links lib link + local initrd_libs lib link initrd_libs=( $(ldd_files "$@") ) @@ -64,48 +64,58 @@ done } -verbose -ne "Shared libs:\t" -# Copy all required shared libraries and the symlinks that -# refer to them. -lib_files=$(shared_object_files "${initrd_bins[@]}") -[ $? -eq 0 ] || return 1 -if [ -n "$lib_files" ]; then - for lib in $lib_files; do - [ -L $root_dir/$lib ] || verbose -n "$lib " - ( cd ${root_dir:-/} ; cp -dp --parents $lib $tmp_mnt ) - done - lib_files= +copy_shared_libs() { + local bins=( "$@" ) + local extra_lib_files lib_files lib i + + # First see what nss and other libs are required. This can be 64bit or 32bit, + # depending on the host and the already copied binaries. case "$(uname -m)" in ia64) + # this is a known location mkdir -p $tmp_mnt/lib - lib_files="$lib_files `echo $root_dir/lib/libnss_{dns,files}* $root_dir/lib/lib{gcc_s,unwind}.so*`" + extra_lib_files="`echo $root_dir/lib/libnss_{dns,files}* $root_dir/lib/lib{gcc_s,unwind}.so*`" ;; *) - # no symlinks, most point into the running system - for i in `LANG=C LC_ALL=C file -b $tmp_mnt/{,usr/}{lib*/udev/,{,s}bin}/* | sed -n 's/^ELF \([0-9][0-9]-bit\) .*/\1/p' | sort -u` + # Skip symlinks, they may point into the running system instead of $tmp_mnt + for i in `LANG=C LC_ALL=C file -b $tmp_mnt/{,usr/}{lib*/udev,{,s}bin}/* | sed -n 's/^ELF \([0-9][0-9]-bit\) .*/\1/p' | sort -u` do case "$i" in 32-bit) mkdir -p $tmp_mnt/lib - lib_files="$lib_files `echo $root_dir/lib/libnss_{dns,files}* $root_dir/lib/libgcc_s.so*`" + extra_lib_files="$extra_lib_files `echo $root_dir/lib/libnss_{dns,files}* $root_dir/lib/libgcc_s.so*`" ;; 64-bit) mkdir -p $tmp_mnt/lib64 - lib_files="$lib_files `echo $root_dir/lib64/libnss_{dns,files}* $root_dir/lib64/libgcc_s.so*`" + extra_lib_files="$extra_lib_files `echo $root_dir/lib64/libnss_{dns,files}* $root_dir/lib64/libgcc_s.so*`" ;; esac done ;; esac - for lib in $lib_files ; do - if [ -f $lib ] ; then - verbose -n "${lib##$root_dir/} " - cp -dp --parents $lib $tmp_mnt + verbose -ne "Shared libs:\t" + + # Now collect a list of libraries on which the binaries and extra libs depend on + lib_files=$( shared_object_files ${bins[@]} $extra_lib_files ) + if [ $? -eq 0 ] + then + if [ -n "$lib_files" ] + then + # Finally copy dependencies and extra libs + for lib in $lib_files $extra_lib_files + do + [ -L $root_dir/$lib ] || verbose -n "$lib " + ( cd ${root_dir:-/} ; cp -dp --parents $lib $tmp_mnt ) + done + verbose + else + verbose "none" fi - done - verbose -else - verbose "none" -fi + else + return 1 + fi +} +# Copy all required shared libraries and the symlinks that refer to them. +copy_shared_libs "${initrd_bins[@]}" -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
