Hello community,

here is the log from the commit of package mkinitrd for openSUSE:Factory 
checked in at 2013-05-13 15:09:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mkinitrd (Old)
 and      /work/SRC/openSUSE:Factory/.mkinitrd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mkinitrd"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mkinitrd/mkinitrd.changes        2013-04-23 
17:20:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mkinitrd.new/mkinitrd.changes   2013-05-13 
15:09:05.000000000 +0200
@@ -2 +2 @@
-Mon Apr 22 14:43:49 UTC 2013 - [email protected]
+Mon May  6 15:39:12 CEST 2013 - [email protected]
@@ -4,2 +4,17 @@
-- Be sure that plymouth does not break emergency shell
-- Add sulogin and shadow password entry for root
+- Find modalias for mmc driver
+
+-------------------------------------------------------------------
+Mon May  6 15:37:38 CEST 2013 - [email protected]
+
+- include mmc drivers in monster initrd 
+
+-------------------------------------------------------------------
+Thu May  2 13:56:26 UTC 2013 - [email protected]
+
+- setup-storage: Support /dev/md/ subdir
+
+-------------------------------------------------------------------
+Wed Apr 10 12:57:27 CEST 2013 - [email protected]
+
+- Switch plymouth and/or splash off before escaping to emergency
+  shell (bnc#809812)

Old:
----
  mkinitrd-2.7.2-sulogin.patch

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

Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.9zC5MJ/_old  2013-05-13 15:09:07.000000000 +0200
+++ /var/tmp/diff_new_pack.9zC5MJ/_new  2013-05-13 15:09:07.000000000 +0200
@@ -51,7 +51,6 @@
 Group:          System/Base
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        mkinitrd.tar.bz2
-Patch0:         mkinitrd-2.7.2-sulogin.patch
 # Note: the whole package is maintained in this git repository, please
 # 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
@@ -86,7 +85,6 @@
 
 %prep
 %setup
-%patch0
 
 %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.2/man/mkinitrd.8.txt 
new/mkinitrd-2.7.2/man/mkinitrd.8.txt
--- old/mkinitrd-2.7.2/man/mkinitrd.8.txt       2013-03-21 15:43:57.000000000 
+0100
+++ new/mkinitrd-2.7.2/man/mkinitrd.8.txt       2013-05-06 15:39:34.000000000 
+0200
@@ -142,6 +142,9 @@
 but for example in a spec file to pre-generate an initrd or to  generate  a
 special  kdump  initrd (which *mkdumprd*(8) does).
 
+*-P*::
+Do not include the password of the super user (root).
+
 *-A*::
 Create  a so called "monster initrd" which includes all available features and
 modules.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/mkinitrd.changes 
new/mkinitrd-2.7.2/mkinitrd.changes
--- old/mkinitrd-2.7.2/mkinitrd.changes 2013-03-21 15:43:57.000000000 +0100
+++ new/mkinitrd-2.7.2/mkinitrd.changes 2013-05-06 15:39:34.000000000 +0200
@@ -1,4 +1,25 @@
 -------------------------------------------------------------------
+Mon May  6 15:39:12 CEST 2013 - [email protected]
+
+- Find modalias for mmc driver
+
+-------------------------------------------------------------------
+Mon May  6 15:37:38 CEST 2013 - [email protected]
+
+- include mmc drivers in monster initrd 
+
+-------------------------------------------------------------------
+Thu May  2 13:56:26 UTC 2013 - [email protected]
+
+- setup-storage: Support /dev/md/ subdir
+
+-------------------------------------------------------------------
+Wed Apr 10 12:57:27 CEST 2013 - [email protected]
+
+- Switch plymouth and/or splash off before escaping to emergency
+  shell (bnc#809812)
+
+-------------------------------------------------------------------
 Thu Mar 21 15:42:49 CET 2013 - [email protected]
 
 - fix wrong target dependency (local_fs -> local-fs) (bnc#787075)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/sbin/mkinitrd 
new/mkinitrd-2.7.2/sbin/mkinitrd
--- old/mkinitrd-2.7.2/sbin/mkinitrd    2013-03-21 15:43:57.000000000 +0100
+++ new/mkinitrd-2.7.2/sbin/mkinitrd    2013-05-06 15:39:34.000000000 +0200
@@ -279,7 +279,7 @@
 {
     local dir st size last_size=0
 
-    for dir in "$TMPDIR" /dev/shm /tmp /var/tmp; do
+    for dir in ${TMPDIR:-/tmp} /dev/shm /tmp /var/tmp; do
         if test ! -w "$dir"; then
             continue
         fi
@@ -306,12 +306,13 @@
 }
 find_tmpdir
 
-work_dir=$(mktemp -qd $tmp_dir/${mkinit_name}.XXXXXX)
+work_dir=$(mktemp -qd $tmp_dir/${mkinit_name}.XXXXXXXX)
 if [ $? -ne 0 ]; then
         echo "$0: Can't create temp dir, exiting." >&2
         exit 1
 fi
-
+TMPDIR=$work_dir
+export TMPDIR
 
 saved_args=$@
 read_options
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/scripts/boot-mount.sh 
new/mkinitrd-2.7.2/scripts/boot-mount.sh
--- old/mkinitrd-2.7.2/scripts/boot-mount.sh    2013-03-21 15:43:57.000000000 
+0100
+++ new/mkinitrd-2.7.2/scripts/boot-mount.sh    2013-05-06 15:39:34.000000000 
+0200
@@ -67,9 +67,7 @@
 
 # And now for the real thing
 if ! discover_root ; then
-    echo "not found -- exiting to /bin/sh"
-    cd /
-    PATH=$PATH PS1='$ ' sh -i
+    emergency "not found"
 fi
 
 sysdev=$(udevadm info -q path -n $rootdev)
@@ -95,9 +93,7 @@
 oacp=$(type -p on_ac_power)
 # check filesystem if possible
 if [ -z "$rootfstype" ]; then
-    echo "invalid root filesystem -- exiting to /bin/sh"
-    cd /
-    PATH=$PATH PS1='$ ' sh -i
+    emergency "invalid root filesystem"
 # skip fsck if running on battery                                              
                                                                                
           
 elif [ -n "${oacp}" ] && ! ${oacp} -q ; then
     echo skipping fsck because running on batteries 
@@ -159,9 +155,7 @@
 echo mount $opt $rootdev /root
 mount $opt $rootdev /root
 if [ $? -ne 0 ] ; then
-    echo "could not mount root filesystem -- exiting to /bin/sh"
-    cd /
-    PATH=$PATH PS1='$ ' sh -i
+    emergency "could not mount root filesystem"
 fi
 
 unset discover_root
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/scripts/boot-network.sh 
new/mkinitrd-2.7.2/scripts/boot-network.sh
--- old/mkinitrd-2.7.2/scripts/boot-network.sh  2013-03-21 15:43:57.000000000 
+0100
+++ new/mkinitrd-2.7.2/scripts/boot-network.sh  2013-05-06 15:39:34.000000000 
+0200
@@ -59,9 +59,7 @@
     if [ -s /var/lib/dhcpcd/dhcpcd-$interface.info ] ; then
         . /var/lib/dhcpcd/dhcpcd-$interface.info
     else
-        echo "no response from dhcp server -- exiting to /bin/sh"
-        cd /
-        PATH=$PATH PS1='$ ' sh -i
+        emergency "no response from dhcp server"
     fi
     [ -e "/var/run/dhcpcd-$interface.pid" ] && kill -9 $(cat 
/var/run/dhcpcd-$interface.pid)
     if [ -n "$DNS" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/scripts/boot-start.sh 
new/mkinitrd-2.7.2/scripts/boot-start.sh
--- old/mkinitrd-2.7.2/scripts/boot-start.sh    2013-03-21 15:43:57.000000000 
+0100
+++ new/mkinitrd-2.7.2/scripts/boot-start.sh    2013-05-06 15:39:34.000000000 
+0200
@@ -14,6 +14,7 @@
 #%programs: showconsole
 #%programs: sleep
 #%programs: umount
+#%programs: sulogin
 
 # tools used by linuxrc/init
 #%programs: insmod
@@ -45,13 +46,31 @@
 die() {
     umount /proc
     umount /sys
-    if [ "$devpts" = "yes" ]; then
-        umount -t devpts /dev/pts
-    fi
+    umount /dev/pts
     umount /dev
     exit $1
 }
 
+emergency() {
+    local plymouth sulogin
+    if plymouth=$(type -p plymouth 2> /dev/null) ; then
+       $plymouth quit
+       $plymouth --wait
+    fi
+    if test -w /proc/splash ; then
+       echo verbose >| /proc/splash
+    fi
+    cd /
+    echo -n "${1+$@} -- "
+    if sulogin=$(type -p sulogin 2> /dev/null); then
+       echo "exiting to $sulogin"
+       PATH=$PATH PS1='$ ' $sulogin /dev/console
+    else
+       echo "exiting to /bin/sh"
+       PATH=$PATH PS1='$ ' /bin/sh -i
+    fi
+}
+
 mount -t proc proc /proc
 mount -t sysfs sysfs /sys
 if mount -t devtmpfs -o mode=0755,nr_inodes=0 devtmpfs /dev; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/scripts/setup-block.sh 
new/mkinitrd-2.7.2/scripts/setup-block.sh
--- old/mkinitrd-2.7.2/scripts/setup-block.sh   2013-03-21 15:43:57.000000000 
+0100
+++ new/mkinitrd-2.7.2/scripts/setup-block.sh   2013-05-06 15:39:34.000000000 
+0200
@@ -61,6 +61,30 @@
 }
 
 # Brief
+#       Finds additional modules required for a block backend
+#
+# Parameters:
+#       device [in]:  the device
+#       result [out]: a string with a module name
+#
+# Return value:
+#       The function always returns 0.
+#
+find_blkmodule() {
+    local blkdev="$1"
+    local devpath=$(cd -P "/sys/block/$blkdev/device"; echo $PWD)
+
+    while [ $(basename "$devpath") != "sys" ]; do
+        devpath=$(cd -P "$devpath/.."; echo $PWD)
+        if [ -L "$devpath/driver/module" ] ; then
+            basename $(readlink $devpath/driver/module)
+            break
+        fi
+    done
+    return 0
+}
+
+# Brief
 #       Resolves the kernel modules needed for a device
 #
 # Parameters:
@@ -124,7 +148,8 @@
             echo "[BLOCK] WARNING: Loop device detected. Include the required 
drivers manually." >&2
             ;;
         mmc*)
-            result=mmc_block
+            result=$(find_blkmodule "$blkdev")
+            result="$result mmc_block"
             ;;
         fio*)
             result=iomemory-vsl
@@ -163,7 +188,7 @@
 }
 
 if [ "$create_monster_initrd" ]; then
-    for d in 
$root_dir/lib/modules/$kernel_version/kernel/drivers/{ata,ide,scsi,s390/block,s390/scsi};
 do
+    for d in 
$root_dir/lib/modules/$kernel_version/kernel/drivers/{ata,ide,scsi,s390/block,s390/scsi,mmc};
 do
         if [ -d "$d" ]; then
             for i in $(find "$d" -name "*.ko" -o -name "*.ko.gz"); do
                 i="${i%*.gz}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/scripts/setup-done.sh 
new/mkinitrd-2.7.2/scripts/setup-done.sh
--- old/mkinitrd-2.7.2/scripts/setup-done.sh    2013-03-21 15:43:57.000000000 
+0100
+++ new/mkinitrd-2.7.2/scripts/setup-done.sh    2013-05-06 15:39:34.000000000 
+0200
@@ -13,8 +13,12 @@
 pushd . > /dev/null 2>&1
 cd $tmp_mnt
 # suid mount will fail if mkinitrd was called as user
-find . -type f \( -perm -4000 -o -perm -2000 \) -exec chmod 755 {} \;
-find *bin usr/*bin -type f -exec chmod 755 {} \;
+find . -type f -and \( -perm -4000 -or -perm -2000 \) -exec chmod 755 {} \+
+find *bin usr/*bin -type f -exec chmod 755 {} \+
+# find any files which are only readable by owner and/or group
+# if so make initrd only radable by the (super) user
+secure=$(find etc \( -type f -or -type d \) -and \! -perm -004 2>/dev/null | 
wc -l)
+(($secure == 0)) || umask 0066
 if ! find . ! -name "*~" | cpio --quiet -H newc --create | $COMPRESS > 
$tmp_initrd
 then
     oops 8 "Failed to build initrd"
@@ -28,8 +32,7 @@
    tmp_initrd=$tmp_initrd.uboot
 fi
 popd > /dev/null 2>&1
-if ! cp -f $tmp_initrd $initrd_image ; then
+if ! cp -pf $tmp_initrd $initrd_image ; then
     oops 8 "Failed to install initrd"
 fi
 rm -rf $tmp_mnt
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/scripts/setup-prepare.sh 
new/mkinitrd-2.7.2/scripts/setup-prepare.sh
--- old/mkinitrd-2.7.2/scripts/setup-prepare.sh 2013-03-21 15:43:57.000000000 
+0100
+++ new/mkinitrd-2.7.2/scripts/setup-prepare.sh 2013-05-06 15:39:34.000000000 
+0200
@@ -9,6 +9,7 @@
 #%param_M: "System.map file to use." map sysmap
 #%param_A: "Create a so called \"monster initrd\" which includes all features 
and modules possible."
 #%param_B: "Do not update bootloader configuration."
+#%param_P: "Do not include the password of the super user (root)."
 #%param_v: "Verbose mode."
 #%param_R: "Print release (version)."
 #%param_L: "Disable logging."
@@ -215,21 +216,44 @@
     $root_dir/etc/modprobe.d ; do
     test -e $mod && cp -r $mod $tmp_mnt/etc
 done
-cat > $tmp_mnt/bin/true <<-EOF
-#! /bin/sh
-:
-EOF
+cat > $tmp_mnt/bin/true <<-'EOF'
+       #! /bin/sh
+       :
+       EOF
 chmod +x $tmp_mnt/bin/true
 
 mkdir -p $tmp_mnt/var/log
 
+# password support only if initrd is created by super user
+(($(id -u) == 0)) || param_P=yes
+if [ -z "$param_P" ]; then
+    pw=x
+else
+    pw=
+fi
+
 # all dev nodes belong to root, but some may be
 # owned by a group other than root
-# getent passwd | sed 
'/^root:/s/^\([^:]\+\):[^:]*:\([^:]\+\):\([^:]\+\):.*/\1::\2:\3:::/p;d' > 
$tmp_mnt/etc/passwd
-echo 'root::0:0:::' > $tmp_mnt/etc/passwd
-echo 'nobody::65534:65533:::' >> $tmp_mnt/etc/passwd
-getent group | sed 's/^\([^:]\+\):[^:]*:\([^:]\+\):.*/\1::\2:/' > 
$tmp_mnt/etc/group
-(echo 'passwd: files';echo 'group: files') > $tmp_mnt/etc/nsswitch.conf
+#  getent --service=files passwd | \
+#  sed -n 
"/^\(nobody\|root\):/s/^\([^:]\+\):[^:]*:\([^:]\+\):\([^:]\+\):.*/\1:${pw}:\2:\3::\/:/p"
 > $tmp_mnt/etc/passwd
+cat > $tmp_mnt/etc/passwd <<-EOF
+       root:${pw}:0:0::/:
+       nobody:${pw}:65534:65533::/:
+       EOF
+getent --service=files group | sed -n 
's/^\([^:+]\+\):[^:]*:\([^:]\+\):.*/\1::\2:/p' > $tmp_mnt/etc/group
+cat > $tmp_mnt/etc/nsswitch.conf <<-'EOF'
+       passwd: files
+       shadow: files
+       group: files
+       EOF
+if [ -z "$param_P" ]; then
+    oumask=$(umask)
+    umask 0026
+    getent --service=files shadow | \
+    sed -n 
'/^\(nobody\|root\):/s/^\([^:]\+\):\([^:]\+\):\([0-9]*\):.*/\1:\2:\3::::::/p' > 
$tmp_mnt/etc/shadow
+    chgrp shadow $tmp_mnt/etc/shadow
+    umask $oumask
+fi
 
 # scsi_id config file
 f=/etc/scsi_id.config
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkinitrd-2.7.2/scripts/setup-storage.sh 
new/mkinitrd-2.7.2/scripts/setup-storage.sh
--- old/mkinitrd-2.7.2/scripts/setup-storage.sh 2013-03-21 15:43:57.000000000 
+0100
+++ new/mkinitrd-2.7.2/scripts/setup-storage.sh 2013-05-06 15:39:34.000000000 
+0200
@@ -228,6 +228,9 @@
       /dev/disk/*)
         realrootdev=$(readlink -m $realrootdev)
         ;;
+      /dev/md/*)
+        realrootdev=$(/usr/bin/readlink -m $realrootdev)
+        ;;
       *:*|//*)
         [ "$type" = "Root" ] && x="$rootfstype-root"
         ;;

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

Reply via email to