Hello community, here is the log from the commit of package mkinitrd for openSUSE:Factory checked in at 2012-03-30 14:19:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mkinitrd (Old) and /work/SRC/openSUSE:Factory/.mkinitrd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "mkinitrd", Maintainer is "MMarek@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/mkinitrd/mkinitrd.changes 2012-03-29 07:45:38.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.mkinitrd.new/mkinitrd.changes 2012-03-30 14:19:44.000000000 +0200 @@ -1,0 +2,8 @@ +Wed Mar 28 20:35:35 UTC 2012 - rschweikert@suse.com + +- add patches mkinitrd_cpbin_follow_link.patch and + mkinitrd_simplify_netsetup.patch; pull requests 6 & 7 in gitorious + - setup-prepare: cp_bin() needs to follow links + - setup-network: move loop independent operation outside the loop + +------------------------------------------------------------------- New: ---- mkinitrd_cpbin_follow_link.patch mkinitrd_simplify_netsetup.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.spec ++++++ --- /var/tmp/diff_new_pack.pNi40j/_old 2012-03-30 14:19:47.000000000 +0200 +++ /var/tmp/diff_new_pack.pNi40j/_new 2012-03-30 14:19:47.000000000 +0200 @@ -51,6 +51,8 @@ # don't change it in the build service without sending the author a # pull request or patch first. Otherwise, you risk that your changes will be # silently overwritten by the next submission. +Patch0: mkinitrd_cpbin_follow_link.patch +Patch1: mkinitrd_simplify_netsetup.patch Url: http://gitorious.org/opensuse/mkinitrd %description @@ -81,6 +83,8 @@ %prep %setup +%patch0 +%patch1 %build %__cc $RPM_OPT_FLAGS -Wall -Os -o lib/mkinitrd/bin/run-init src/run-init.c ++++++ mkinitrd_cpbin_follow_link.patch ++++++ --- scripts/setup-prepare.sh.orig +++ scripts/setup-prepare.sh @@ -23,23 +23,57 @@ ## # Install a binary file +cp_link() { + # Copy the target of the given link $1 to the destination $2 + # spaces and special characters in file names will break things + if [ -h "$1" ]; then + lnkTarget=$(readlink $1) + if [ -e $lnkTarget ];then + cp -a $lnkTarget $2/$lnkTarget + else + # This link points to something in the same directory + lnkSrc="$1" + # Get the base bath of the link origin + lnkSrcBase=${lnkSrc%/*} + cp -a $lnkSrcBase/$lnkTarget $2/$lnkSrcBase/$lnkTarget + fi + return 1 + fi + return 0 +} + cp_bin() { cp -a "$@" \ || exit_code=1 - # Remember the binaries installed. We need the list for checking - # for dynamic libraries. - while [ $# -gt 1 ]; do - initrd_bins[${#initrd_bins[@]}]=$1 - shift - done - # file may print '^setuid ELF ...' - # suid mount will fail if mkinitrd was called as user - if [ -L "$1" ]; then - : do nothing with symlinks - elif [ -d "$1" -o -f "$1" ]; then - find "$1" -type f -print0 | xargs -0 chmod 0755 - fi + if [ -h "$1" ]; then + lnkTarget=$1 + # Determine the base bath of the target + targetPath="$2" + targetBase=${targetPath%$1*} + while [ 1 ]; do + cp_link $lnkTarget $targetBase + lnkCopied=$? + if [ $lnkCopied = 0 ]; then + if [ -e $lnkTarget ]; then + initrd_bins[${#initrd_bins[@]}]=$lnkTarget + fi + break + fi + done + else + # Remember the binaries installed. We need the list for checking + # for dynamic libraries. + while [ $# -gt 1 ]; do + initrd_bins[${#initrd_bins[@]}]=$1 + shift + done + # file may print '^setuid ELF ...' + # suid mount will fail if mkinitrd was called as user + if [ -d "$1" -o -f "$1" ]; then + find "$1" -type f -print0 | xargs -0 chmod 0755 + fi + fi } # check if we should use script or feature $1 ++++++ mkinitrd_simplify_netsetup.patch ++++++ --- scripts/setup-network.sh.orig +++ scripts/setup-network.sh @@ -306,18 +306,14 @@ for f in /{lib,etc}/udev/rules.d/77-netw continue fi cp --parents "$f" $tmp_mnt/ - cp_bin /sbin/ifup $tmp_mnt/sbin/ifup - mkdir -p $tmp_mnt/etc/alternatives - for bin in /bin/{g,}awk /etc/alternatives/awk; do - if test -e $bin; then - cp_bin $bin $tmp_mnt/$bin - fi - done - cp_bin /bin/grep $tmp_mnt/bin/grep - cp_bin /bin/logger $tmp_mnt/bin/logger - cp_bin /bin/touch $tmp_mnt/bin/touch - break done +# awk points to alternatives, need the directory +mkdir -p $tmp_mnt/etc/alternatives +cp_bin /bin/awk $tmp_mnt/bin/awk +cp_bin /bin/grep $tmp_mnt/bin/grep +cp_bin /sbin/ifup $tmp_mnt/sbin/ifup +cp_bin /bin/logger $tmp_mnt/bin/logger +cp_bin /bin/touch $tmp_mnt/bin/touch test -n "$static_interfaces" && verbose "[NETWORK]\tstatic: $static_interfaces" test -n "$dhcp_interfaces" && verbose "[NETWORK]\tdynamic: $dhcp_interfaces" -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org