Hello community,

here is the log from the commit of package mkinitrd for openSUSE:Factory 
checked in at 2012-06-15 14:03:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mkinitrd (Old)
 and      /work/SRC/openSUSE:Factory/.mkinitrd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mkinitrd", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mkinitrd/mkinitrd.changes        2012-05-31 
17:07:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mkinitrd.new/mkinitrd.changes   2012-06-15 
14:03:34.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Jun 12 15:28:45 UTC 2012 - [email protected]
+
+- mount /usr without chrooting into root fs first, /usr carries
+  important binaries by now (bnc#752796)
+
+-------------------------------------------------------------------
@@ -11,0 +18,6 @@
+Thu May  3 11:59:35 UTC 2012 - [email protected]
+
+- Avoid accidental tilde expansion when parsing parameters
+  (bnc#760364).
+
+-------------------------------------------------------------------
@@ -38 +50 @@
-- boot-udev: add blkid dependency (bnc#751140, bnc#754049, and others).
+- boot-udev: add blkid dependency

Old:
----
  mkinitrd-add-logitech-unity
  mkinitrd-firmware-in-usr
  mkinitrd_cp_umount_mount_dmesg_in_usr.patch
  mkinitrd_cpbin_follow_link.patch
  mkinitrd_simplify_netsetup.patch
  mkinitrd_systemd_adjtime.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.lYCODC/_old  2012-06-15 14:03:36.000000000 +0200
+++ /var/tmp/diff_new_pack.lYCODC/_new  2012-06-15 14:03:36.000000000 +0200
@@ -51,12 +51,6 @@
 # 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
-Patch2:         mkinitrd-firmware-in-usr
-Patch3:         mkinitrd_cp_umount_mount_dmesg_in_usr.patch
-Patch4:         mkinitrd-add-logitech-unity
-Patch5:         mkinitrd_systemd_adjtime.patch
 Url:            http://gitorious.org/opensuse/mkinitrd
 
 %description
@@ -87,12 +81,6 @@
 
 %prep
 %setup
-%patch0
-%patch1
-%patch2 -p1
-%patch3
-%patch4 -p1
-%patch5
 
 %build
 %__cc $RPM_OPT_FLAGS -Wall -Os -o lib/mkinitrd/bin/run-init src/run-init.c

++++++ mkinitrd.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/mkinitrd.changes 
new/mkinitrd-2.7.0/mkinitrd.changes
--- old/mkinitrd-2.7.0/mkinitrd.changes 2012-03-22 11:30:37.000000000 +0100
+++ new/mkinitrd-2.7.0/mkinitrd.changes 2012-06-13 15:58:10.000000000 +0200
@@ -1,4 +1,50 @@
 -------------------------------------------------------------------
+Tue Jun 12 15:28:45 UTC 2012 - [email protected]
+
+- mount /usr without chrooting into root fs first, /usr carries
+  important binaries by now (bnc#752796)
+
+-------------------------------------------------------------------
+Tue May 29 07:38:50 UTC 2012 - [email protected]
+
+- Fix clock scriptlet by adding `then'
+
+-------------------------------------------------------------------
+Wed May 23 12:48:47 UTC 2012 - [email protected]
+
+- Make warpclock working with upstream systemd HW clock management
+
+-------------------------------------------------------------------
+Thu May  3 11:59:35 UTC 2012 - [email protected]
+
+- Avoid accidental tilde expansion when parsing parameters
+  (bnc#760364).
+
+-------------------------------------------------------------------
+Mon Apr 30 19:39:01 UTC 2012 - [email protected]
+
+- Add Logitech Unifying devices to initrd (bnc#741451).
+
+-------------------------------------------------------------------
+Mon Apr 30 13:06:38 UTC 2012 - [email protected]
+
+- support cp, mount, umount, and dmesg in usr tree
+
+-------------------------------------------------------------------
+Tue Apr 17 22:58:25 UTC 2012 - [email protected]
+
+- Change firmware search path to /usr/lib/firmware -- udev as of 182
+  doesn't look in /lib/firmware (bnc#757655).
+
+-------------------------------------------------------------------
+Wed Mar 28 20:35:35 UTC 2012 - [email protected]
+
+- 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
+
+-------------------------------------------------------------------
 Thu Mar 22 10:29:58 UTC 2012 - [email protected]
 
 - boot-udev: add blkid dependency
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/sbin/mkinitrd 
new/mkinitrd-2.7.0/sbin/mkinitrd
--- old/mkinitrd-2.7.0/sbin/mkinitrd    2012-03-22 11:30:37.000000000 +0100
+++ new/mkinitrd-2.7.0/sbin/mkinitrd    2012-06-13 15:58:10.000000000 +0200
@@ -78,7 +78,7 @@
 
 cmd_docmd() {
     for i in "${cmd_option[@]}"; do
-        if [ "${i%%~*}" = "$1" ]; then
+        if [ "${i%%\~*}" = "$1" ]; then
             parse_option "$i"
             return 0
         fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/boot-boot.sh 
new/mkinitrd-2.7.0/scripts/boot-boot.sh
--- old/mkinitrd-2.7.0/scripts/boot-boot.sh     2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/boot-boot.sh     2012-06-13 15:58:10.000000000 
+0200
@@ -75,6 +75,18 @@
        fi
 }
 
+# Mount the /usr filesystem if possible
+# XXX: handle journaldev for the /usr device separately
+if test -n "$usrdev"; then
+        if /sbin/fsck -t $usrfstype $fsckopts $usrdev; then
+            echo "Mounting /usr"
+            fsoptions=$(get_options_from_fstab "/usr")
+            if [ "$fsoptions" ]; then
+                  fsoptions="-o $fsoptions"
+            fi
+            /bin/mount -t $usrfstype $fsoptions $usrdev /root/usr
+        fi
+fi
 
 # Move device nodes
 /bin/mount --move /dev /root/dev
@@ -85,15 +97,6 @@
        umount -l /run
 fi
 
-# Mount the /usr filesystem if possible
-# XXX: handle journaldev for the /usr device separately
-if test -n "$usrdev"; then
-       if chroot /root /sbin/fsck -t $usrfstype $fsckopts $usrdev; then
-           echo "Mounting /usr"
-           chroot /root /bin/mount /usr
-       fi
-fi
-
 # SELinux load policy
 selinux_load_policy "/root"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/boot-clock.sh 
new/mkinitrd-2.7.0/scripts/boot-clock.sh
--- old/mkinitrd-2.7.0/scripts/boot-clock.sh    2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/boot-clock.sh    2012-06-13 15:58:10.000000000 
+0200
@@ -12,4 +12,14 @@
     *-l*) /bin/warpclock
          > /dev/shm/warpclock
     esac
+elif test -e /etc/adjtime -a -e /etc/localtime
+then
+    while read line
+    do
+       if test "$line" = LOCAL
+       then
+           /bin/warpclock
+           > /dev/shm/warpclock
+       fi
+    done < /etc/adjtime
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/boot-mount.sh 
new/mkinitrd-2.7.0/scripts/boot-mount.sh
--- old/mkinitrd-2.7.0/scripts/boot-mount.sh    2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/boot-mount.sh    2012-06-13 15:58:10.000000000 
+0200
@@ -3,7 +3,7 @@
 #%stage: filesystem
 #%depends: resume
 #
-#%programs: /sbin/fsck $rootfsck
+#%programs: /sbin/fsck $rootfsck $usrfsck
 #%if: ! "$root_already_mounted"
 #%dontshow
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/boot-remount.sh 
new/mkinitrd-2.7.0/scripts/boot-remount.sh
--- old/mkinitrd-2.7.0/scripts/boot-remount.sh  2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/boot-remount.sh  2012-06-13 15:58:10.000000000 
+0200
@@ -37,9 +37,8 @@
     die 1
 fi
 
-# Parse root mount options
-if [ -f /root/etc/fstab ] ; then
-    fsoptions=$(while read d m f o r; do if [ "$m" == "/" ] ; then echo $o; 
fi; done < <(sed -e '/^[ \t]*#/d' < /root/etc/fstab))
+function get_options_from_fstab() {
+    local fsoptions=$(while read d m f o r; do if [ "$m" == "$1" ] ; then echo 
$o; fi; done < <(sed -e '/^[ \t]*#/d' < /root/etc/fstab))
     set -- $(IFS=,; echo $fsoptions)
     fsoptions=
     if [ "$read_only" ]; then
@@ -68,6 +67,13 @@
         esac
         shift
     done
+    echo "$fsoptions"
+}
+
+
+# Parse root mount options
+if [ -f /root/etc/fstab ] ; then
+    fsoptions=$(get_options_from_fstab "/")
     if [ "$fsoptions" ] ; then
         mount -o remount,$fsoptions $rootdev /root
     fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/boot-start.sh 
new/mkinitrd-2.7.0/scripts/boot-start.sh
--- old/mkinitrd-2.7.0/scripts/boot-start.sh    2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/boot-start.sh    2012-06-13 15:58:10.000000000 
+0200
@@ -2,7 +2,7 @@
 #
 #%stage: boot
 #%depends: devfunctions
-#%programs: /bin/bash umount mount /bin/mknod /bin/mkdir /bin/ln /bin/date 
/bin/sleep /bin/cat /bin/sed /sbin/insmod /sbin/modprobe /bin/kill 
/sbin/killall5 /sbin/halt /sbin/reboot /sbin/showconsole cp /sbin/pidof /bin/mv 
/bin/chmod /bin/rm /bin/true /bin/ls /lib/mkinitrd/bin/* dmesg
+#%programs: /bin/bash /bin/umount /bin/mount /bin/mknod /bin/mkdir /bin/ln 
/bin/date /bin/sleep /bin/cat /bin/sed /sbin/insmod /sbin/modprobe /bin/kill 
/sbin/killall5 /sbin/halt /sbin/reboot /sbin/showconsole /bin/cp /sbin/pidof 
/bin/mv /bin/chmod /bin/rm /bin/true /bin/ls /lib/mkinitrd/bin/* /bin/dmesg
 #%modules: $RESOLVED_INITRD_MODULES
 #%udevmodules: $RESOLVED_INITRD_MODULES_UDEV
 #%dontshow
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/boot-usb.sh 
new/mkinitrd-2.7.0/scripts/boot-usb.sh
--- old/mkinitrd-2.7.0/scripts/boot-usb.sh      2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/boot-usb.sh      2012-06-13 15:58:10.000000000 
+0200
@@ -1,6 +1,6 @@
 #!/bin/bash
 #%stage: device
-#%udevmodules: usbcore ohci_hcd uhci-hcd ehci_hcd usbhid
+#%udevmodules: usbcore ohci_hcd uhci-hcd ehci_hcd usbhid hid-logitech-dj
 #%if: "$use_usb"
 #
 ##### usb module helper
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/setup-clock.sh 
new/mkinitrd-2.7.0/scripts/setup-clock.sh
--- old/mkinitrd-2.7.0/scripts/setup-clock.sh   2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/setup-clock.sh   2012-06-13 15:58:10.000000000 
+0200
@@ -15,6 +15,14 @@
 if test -e /etc/sysconfig/clock
 then
     . /etc/sysconfig/clock
-    mkdir -m 0755 -p $tmp_mnt/etc/sysconfig
-    echo HWCLOCK='"'"$HWCLOCK"'"' > $tmp_mnt/etc/sysconfig/clock
+    if test -n "$HWCLOCK"
+    then
+       mkdir -m 0755 -p $tmp_mnt/etc/sysconfig
+       echo HWCLOCK='"'"$HWCLOCK"'"' > $tmp_mnt/etc/sysconfig/clock
+    fi
+fi
+if test -e /etc/adjtime
+then
+    mkdir -m 0755 -p $tmp_mnt/etc
+    cp -p /etc/adjtime $tmp_mnt/etc/
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/setup-modules.sh 
new/mkinitrd-2.7.0/scripts/setup-modules.sh
--- old/mkinitrd-2.7.0/scripts/setup-modules.sh 2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/setup-modules.sh 2012-06-13 15:58:10.000000000 
+0200
@@ -332,7 +332,12 @@
     for fwl in $(modinfo -F firmware $module) ; do
        bmod=$(basename $module)
        bfwl=$(basename $fwl)
-       for fw in $(find /lib/firmware -name "$bfwl") ; do
+
+       # Using find -L instead of a trailing slash means
+       # we get /lib/firmware instead of /usr/lib/firmware.
+       firmwaredir="/usr/lib/firmware/"
+       [ -e "$firmwaredir" ] || firmwaredir="/lib/firmware/"
+       for fw in $(find "$firmwaredir" -name "$bfwl") ; do
                cp -p --parents $fw $tmp_mnt
                echo -n "(module $bmod firmware $fw) "
        done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/setup-mount.sh 
new/mkinitrd-2.7.0/scripts/setup-mount.sh
--- old/mkinitrd-2.7.0/scripts/setup-mount.sh   2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/setup-mount.sh   2012-06-13 15:58:10.000000000 
+0200
@@ -20,6 +20,12 @@
 
 verbose "[MOUNT] Root:\t$rootdev"
 
+usrfsck="/sbin/fsck.${usrfstype}"
+if [ ! -x "$usrfsck" ]; then
+   # just ignore it - we'll see later what happens
+   usrfsck=
+fi
+
 for file in {/usr,}/bin/on_ac_power; do
     if test -e $file; then
         cp_bin $file $tmp_mnt/usr/bin
@@ -29,3 +35,4 @@
 
 save_var rootdev
 save_var rootfsck
+save_var usrfsck
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/setup-network.sh 
new/mkinitrd-2.7.0/scripts/setup-network.sh
--- old/mkinitrd-2.7.0/scripts/setup-network.sh 2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/setup-network.sh 2012-06-13 15:58:10.000000000 
+0200
@@ -306,18 +306,14 @@
         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"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/setup-prepare.sh 
new/mkinitrd-2.7.0/scripts/setup-prepare.sh
--- old/mkinitrd-2.7.0/scripts/setup-prepare.sh 2012-03-22 11:30:37.000000000 
+0100
+++ new/mkinitrd-2.7.0/scripts/setup-prepare.sh 2012-06-13 15:58:10.000000000 
+0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.0/src/warpclock.c 
new/mkinitrd-2.7.0/src/warpclock.c
--- old/mkinitrd-2.7.0/src/warpclock.c  2012-03-22 11:30:37.000000000 +0100
+++ new/mkinitrd-2.7.0/src/warpclock.c  2012-06-13 15:58:10.000000000 +0200
@@ -82,7 +82,7 @@
     time_t now, delta, gmtoff;
     struct stat st;
     int universal = 1;
-    int count;
+    int count, adj;
 
     err = "warpclock: /etc/localtime";
     if (stat("/etc/localtime", &st) < 0)
@@ -92,9 +92,16 @@
 
     memset(&zone, 0, sizeof(struct timezone));
 
-    err = "warpclock: /etc/sysconfig/clock";
-    if ((conf = fopen("/etc/sysconfig/clock", "r")) == (FILE *)0)
-       goto err;
+    adj = 1;
+    err = "warpclock: /etc/adjtime";
+    if ((conf = fopen("/etc/adjtime", "r")) == (FILE *)0) {
+       if (errno != ENOENT)
+           goto err;
+       adj = 0;
+       err = "warpclock: /etc/sysconfig/clock";
+       if ((conf = fopen("/etc/sysconfig/clock", "r")) == (FILE *)0)
+           goto err;
+    }
     while ((fgets(&buffer[0], sizeof(buffer), conf))) {
        const char * ptr = &buffer[0];
        while (isblank(*ptr))
@@ -103,7 +110,15 @@
            continue;
        if (*ptr == '\n')
            continue;
-       if (strncmp("HWCLOCK=", ptr, 8) == 0) {
+       if (adj) {
+           char *end;
+           if ((end = strrchr(ptr, '\n')))
+               *end = '\0';
+           if (strcmp("UTC", ptr) == 0) {
+               universal = 1;
+               break;
+           }
+       } else if (strncmp("HWCLOCK=", ptr, 8) == 0) {
            universal = !strstr(ptr, "-l");
            break;
        }

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to