Hello community,
here is the log from the commit of package mkinitrd
checked in at Tue Aug 7 14:16:57 CEST 2007.
--------
--- mkinitrd/mkinitrd.changes 2007-08-02 17:01:30.000000000 +0200
+++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2007-08-07 12:52:50.000000000 +0200
@@ -1,0 +2,10 @@
+Tue Aug 7 12:51:22 CEST 2007 - hare@suse.de
+
+- Fix root device detection for update (#297999)
+
+-------------------------------------------------------------------
+Mon Aug 6 10:27:56 CEST 2007 - hare@suse.de
+
+- Add manpage mkinitrd.5
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.LG7670/_old 2007-08-07 14:15:58.000000000 +0200
+++ /var/tmp/diff_new_pack.LG7670/_new 2007-08-07 14:15:58.000000000 +0200
@@ -18,7 +18,7 @@
Requires: coreutils modutils util-linux grep gzip sed gawk cpio udev pciutils sysvinit file perl
Autoreqprov: on
Version: 2.1
-Release: 13
+Release: 15
Summary: Creates an Initial RAM Disk Image for Preloading Modules
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: mkinitrd.tgz
@@ -67,6 +67,7 @@
cp -a lib/mkinitrd/bin $RPM_BUILD_ROOT/lib/mkinitrd/bin
make -C sbin DESTDIR=$RPM_BUILD_ROOT install
chmod -R 755 $RPM_BUILD_ROOT/lib/mkinitrd
+install -D -m 644 man/mkinitrd.5 $RPM_BUILD_ROOT/%{_mandir}/man5/mkinitrd.5
install -D -m 644 man/mkinitrd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/mkinitrd.8
ln -s mkinitrd $RPM_BUILD_ROOT/sbin/mk_initrd
mkdir -p $RPM_BUILD_ROOT/etc/rpm
@@ -98,9 +99,14 @@
/sbin/mkinitrd_setup
/sbin/module_upgrade
/sbin/installkernel
+%doc %{_mandir}/man5/mkinitrd.5.gz
%doc %{_mandir}/man8/mkinitrd.8.gz
%changelog
+* Tue Aug 07 2007 - hare@suse.de
+- Fix root device detection for update (#297999)
+* Mon Aug 06 2007 - hare@suse.de
+- Add manpage mkinitrd.5
* Thu Aug 02 2007 - hare@suse.de
- Detect Xen modules correctly (#290073)
- Fix booting on dmraid devices
++++++ mkinitrd.tgz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/man/mkinitrd.5 new/mkinitrd-2.1/man/mkinitrd.5
--- old/mkinitrd-2.1/man/mkinitrd.5 1970-01-01 01:00:00.000000000 +0100
+++ new/mkinitrd-2.1/man/mkinitrd.5 2007-08-07 12:52:16.000000000 +0200
@@ -0,0 +1,212 @@
+.\" Copyright (C) 2007 SuSE Linux Products GmbH
+.TH mkinitrd 5 "6 August 2007" "mkinitrd" "mkinitrd"
+.SH NAME
+mkinitrd \- description of modular scripts layout
+.SH DESCRIPTION
+.B "mkinitrd"
+creates initial ramdisk images for booting Linux. It is designed to be
+modular, so that functionality required by other programs can be
+maintained in separate scripts.
+.SH DIRECTORY LAYOUT
+All files are located in the directory
+.B "/lib/mkinitrd"
+.
+The directory has the following layout:
+.TP
+.B bin
+External program required during boot
+.TP
+.B dev
+Additional devices nodes to be copied into the mkinitrd.
+.TP
+.B scripts
+Repository for mkinitrd scripts
+.TP
+.B setup
+Resolved links for scripts to be executed during creation of the
+initrd
+.TP
+.B boot
+Resolved links for scripts to be executed during boot.
+
+.SH SCRIPT REPOSITORY
+The directory
+.B "/lib/mkinitrd/scripts"
+is the repository for all mkinitrd scripts. They follow the naming
+convention
+.RS
+.nf
+.ft B
+.sp
+<type>-<name>.sh
+.ft R
+.fi
+.RE
+.LP
+.I <type>
+can be either
+.I setup
+for scripts to be called during initrd creation or
+.I boot
+for scripts to be called during boot. The
+.I <name>
+for a script serves as an identification for the implemented feature;
+it is assumed that scripts named
+.B boot-foo.sh
+and
+.B setup-foo.sh
+both refer to the feature
+.I foo
+
+.SH SCRIPT SYMLINK RESOLUTION
+The directories
+.B "/lib/mkinitrd/setup"
+and
+.B "/lib/mkinitrd/boot"
+hold the resolved symlinks to the scripts in the mkinitrd
+repository. The symlinks have the naming convention
+.RS
+.nf
+.ft B
+.sp
+<number>-<name>.sh
+.ft R
+.fi
+.RE
+.LP
+where
+.I <number>
+determines the execution order (lower numbers will be executed
+earlier) and
+.I <name>
+is the names of the script as mentioned in the previous section. The
+symlinks are maintained by the program
+.B "/sbin/mkinitrd_setup"
+which evaluates the tags in the scripts and creates symlinks with the
+correct name. Manual maintenance in the
+.B "/lib/mkinitrd/setup"
+or
+.B "/lib/mkinitrd/boot"
+directories are strongly discouraged, as any call to
+.B "/sbin/mkinitrd_setup"
+will remove the manually created links.
+
+.SH SCRIPT KEYWORDS
+The execution order of the mkinitrd scripts is determined by
+keywords. The following keywords are recognized:
+
+.TP
+.B #%stage: \fI<name>\fB
+The execution stage for this script
+.TP
+.B #%depends: \fI, Susanne Oberhauser
+, Andreas Gruenbacher , Hannes Reinecke
+, Alexander Graf
+
+.SH FILES
+.PP
+/lib/mkinitrd
+/sbin/mkinitrd
+/sbin/mkinitrd_setup
+
+.SH "SEE ALSO"
+.PP
+\fBmkinitrd\fR(8)
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/mkinitrd.changes new/mkinitrd-2.1/mkinitrd.changes
--- old/mkinitrd-2.1/mkinitrd.changes 2007-08-02 15:47:23.000000000 +0200
+++ new/mkinitrd-2.1/mkinitrd.changes 2007-08-07 12:52:16.000000000 +0200
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Tue Aug 7 12:51:22 CEST 2007 - hare@suse.de
+
+- Fix root device detection for update (#297999)
+
+-------------------------------------------------------------------
+Mon Aug 6 10:27:56 CEST 2007 - hare@suse.de
+
+- Add manpage mkinitrd.5
+
+-------------------------------------------------------------------
Thu Aug 2 14:02:36 CEST 2007 - hare@suse.de
- Detect Xen modules correctly (#290073)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/mkinitrd.spec new/mkinitrd-2.1/mkinitrd.spec
--- old/mkinitrd-2.1/mkinitrd.spec 2007-08-02 15:47:23.000000000 +0200
+++ new/mkinitrd-2.1/mkinitrd.spec 2007-08-07 12:52:16.000000000 +0200
@@ -66,6 +66,7 @@
cp -a lib/mkinitrd/bin $RPM_BUILD_ROOT/lib/mkinitrd/bin
make -C sbin DESTDIR=$RPM_BUILD_ROOT install
chmod -R 755 $RPM_BUILD_ROOT/lib/mkinitrd
+install -D -m 644 man/mkinitrd.5 $RPM_BUILD_ROOT/%{_mandir}/man5/mkinitrd.5
install -D -m 644 man/mkinitrd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/mkinitrd.8
ln -s mkinitrd $RPM_BUILD_ROOT/sbin/mk_initrd
mkdir -p $RPM_BUILD_ROOT/etc/rpm
@@ -97,6 +98,7 @@
/sbin/mkinitrd_setup
/sbin/module_upgrade
/sbin/installkernel
+%doc %{_mandir}/man5/mkinitrd.5.gz
%doc %{_mandir}/man8/mkinitrd.8.gz
%changelog
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/scripts/setup-storage.sh new/mkinitrd-2.1/scripts/setup-storage.sh
--- old/mkinitrd-2.1/scripts/setup-storage.sh 2007-08-02 15:47:23.000000000 +0200
+++ new/mkinitrd-2.1/scripts/setup-storage.sh 2007-08-07 12:52:16.000000000 +0200
@@ -52,6 +52,10 @@
# returns the block device name
majorminor2blockdev() {
local major=$1 minor=$2
+
+ if [ $major -lt 0 ] ; then
+ return
+ fi
if [ ! "$minor" ]; then
minor=$(echo $major | cut -d : -f 2)
major=$(echo $major | cut -d : -f 1)
@@ -86,11 +90,15 @@
done
# get pretty name from device-mapper
- if [ -x /sbin/dmsetup ]; then
- beauty_blockdevn="$(devnumber $root_dir/${olddev})"
- echo -n /dev/mapper/
- dmsetup info -c --noheadings -o name -j $(devmajor $beauty_blockdevn) -m $(devminor $beauty_blockdevn)
+ if [ -x /sbin/dmsetup -a "$blockdriver" = "device-mapper" ]; then
+ dm_name=$(dmsetup info -c --noheadings -o name -j $blockmajor -m $blockminor)
+ if [ "$dm_name" ] ; then
+ echo "/dev/mapper/$dm_name"
+ return
+ fi
fi
+
+ echo $olddev
}
dm_resolvedeps() {
@@ -146,8 +154,8 @@
local curblockdev=$1
[ -z "$curblockdev" ] && curblockdev=$blockdev
- blockmajor=0
- blockminor=0
+ blockmajor=-1
+ blockminor=-1
if [ -e "$root_dir/${curblockdev#/}" ]; then
blockdevn="$(devnumber $root_dir/${curblockdev#/})"
blockmajor="$(devmajor $blockdevn)"
@@ -231,21 +239,15 @@
rootcpio=`echo / | /bin/cpio --quiet -o -H newc`
rootmajor="$(echo $(( 0x${rootcpio:62:8} )) )"
rootminor="$(echo $(( 0x${rootcpio:70:8} )) )"
- if [ $((rootmajor)) -ne 0 ] ; then # don't check for dynamic devices
- rootdev="$(beautify_blockdev $(majorminor2blockdev $rootmajor $rootminor))"
- fi
# get opts from fstab and device too if stat failed
while read fstab_device fstab_mountpoint fstab_type fstab_options dummy ; do
if [ "$fstab_mountpoint" = "/" ]; then
- [ "$rootdev" ] || rootdev="$fstab_device"
update_blockdev "$fstab_device" # get major and minor
- if [ ! "$blockmajor" = 0 ]; then # we don't check dynamic devices
- # let's see if the stat device is the same as the fstab device
- if [ "$blockmajor" -eq "$rootmajor" -a "$blockminor" -eq "$rootminor" ]; then # if both match
- rootdev="$fstab_device" # use the fstab device so the user can decide
- # how to access the root device
- fi
+ # let's see if the stat device is the same as the fstab device
+ if [ "$blockmajor" -eq "$rootmajor" -a "$blockminor" -eq "$rootminor" ]; then # if both match
+ rootdev="$fstab_device" # use the fstab device so the user can decide
+ # how to access the root device
fi
rootfstype="$fstab_type"
rootfsopts="$fstab_options"
@@ -253,6 +255,12 @@
fi
done < <(sed -e '/^[ \t]*#/d' < $root_dir/etc/fstab)
+ if [ $((rootmajor)) -gt 0 -a -z "$rootdev" ] ; then
+ # don't check for non-device mounts
+ rootdev="$(majorminor2blockdev $rootmajor $rootminor)"
+ update_blockdev $rootdev
+ rootdev="$(beautify_blockdev $rootdev)"
+ fi
# no fstype found, so we will try to get it via vol_id
if [ ! "$rootfstype" ]; then
eval $(/lib/udev/vol_id "$rootdev" | grep ID_FS_TYPE)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org