Hello community,
here is the log from the commit of package mkinitrd for openSUSE:Factory
checked in at Tue Aug 11 17:23:14 CEST 2009.
--------
--- mkinitrd/mkinitrd.changes 2009-08-04 13:30:58.000000000 +0200
+++ mkinitrd/mkinitrd.changes 2009-08-11 12:20:08.000000000 +0200
@@ -2 +2,13 @@
-Tue Aug 4 13:24:33 CEST 2009 - mmarek@suse.cz
+Tue Aug 11 11:58:25 CEST 2009 - mmarek@suse.cz
+
+- do not copy module parameters from /proc/cmdline, modprobe does
+ it itself.
+
+-------------------------------------------------------------------
+Tue Aug 11 11:55:15 CEST 2009 - mmarek@suse.cz
+
+- rename the temporary file /etc/modprobe.d/options to options.conf
+ as required by new module-init-tools.
+
+-------------------------------------------------------------------
+Wed Jul 15 15:34:38 CEST 2009 - mmarek@suse.cz
@@ -5,0 +18,5 @@
+
+-------------------------------------------------------------------
+Thu Jul 2 08:53:25 CEST 2009 - hare@suse.de
+
+- Update version to 2.5.10
calling whatdependson for head-i586
Old:
----
mkinitrd-2.5.9-builtin-modules.patch
mkinitrd-2.5.9.patch
mkinitrd-2.5.9_selinux.patch
mkinitrd-setup-udev-firmware-fix
mkinitrd-silence.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.6SAaBY/_old 2009-08-11 17:21:45.000000000 +0200
+++ /var/tmp/diff_new_pack.6SAaBY/_new 2009-08-11 17:21:45.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package mkinitrd (Version 2.5.9)
+# spec file for package mkinitrd (Version 2.5.10)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -25,18 +25,13 @@
BuildRequires: asciidoc libxslt
Requires: coreutils modutils util-linux grep gzip sed cpio udev sysvinit file perl-Bootloader
AutoReqProv: on
-Version: 2.5.9
-Release: 8
+Version: 2.5.10
+Release: 1
Conflicts: udev < 118
Requires: dhcpcd
Summary: Creates an Initial RAM Disk Image for Preloading Modules
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: mkinitrd.tar.bz2
-Patch0: mkinitrd-2.5.9.patch
-Patch1: mkinitrd-setup-udev-firmware-fix
-Patch2: mkinitrd-silence.patch
-Patch3: mkinitrd-2.5.9_selinux.patch
-Patch4: mkinitrd-2.5.9-builtin-modules.patch
%description
Mkinitrd creates file system images for use as initial RAM disk
@@ -63,15 +58,9 @@
Andreas Gruenbacher
Hannes Reinecke
Alexander Graf
- Bernhard Walle
%prep
%setup
-%patch0 -p0
-%patch1 -p1
-%patch2
-%patch3 -p1
-%patch4 -p1
%build
gcc $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.5.9/archive/setup-luks.sh new/mkinitrd-2.5.10/archive/setup-luks.sh
--- old/mkinitrd-2.5.9/archive/setup-luks.sh 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/archive/setup-luks.sh 2009-08-11 11:59:50.000000000 +0200
@@ -45,9 +45,7 @@
luks_lang=$LANG
;;
esac
- for m in $(cat /proc/crypto | grep module | sed 's/^module .*: \(.*\)$/\1/'); do
- cryptmodules="$cryptmodules $m"
- done
+ cryptmodules="$(sed -rn 's/^module[[:blank:]]*:[[:blank:]]*(.*)$/\1/p' < /proc/crypto)"
fi
save_var root_luks # do we have luks?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/archive/setup-splash.sh new/mkinitrd-2.5.10/archive/setup-splash.sh
--- old/mkinitrd-2.5.9/archive/setup-splash.sh 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/archive/setup-splash.sh 2009-08-11 11:59:50.000000000 +0200
@@ -24,9 +24,7 @@
modes=
for file in $root_dir/{etc/lilo.conf,boot/grub/menu.lst,proc/cmdline}; do
[ -e $file ] || continue
- modes="$modes $(sed -e '/^[ \t]*#/d' $file \
- | sed -ne 's/^.*vga[ \t]*=[ \t]*\([^ \t]*\).*/\1/p' \
- | sed -ne '/^\([0-9]\+\|0[xX][0-9a-fA-F]\+\)$/p')"
+ modes="$modes $(sed -rn '/^[[:blank:]]*[^#]/{ s/^.*vga[[:blank:]]*=[[:blank:]]*([[:digit:]]+|0[xX][[:xdigit:]]+)/\1/p; }' $file)"
done
for mode in $modes; do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/lib/mkinitrd/bin/linuxrc new/mkinitrd-2.5.10/lib/mkinitrd/bin/linuxrc
--- old/mkinitrd-2.5.9/lib/mkinitrd/bin/linuxrc 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/lib/mkinitrd/bin/linuxrc 2009-08-11 11:59:50.000000000 +0200
@@ -6,7 +6,7 @@
# e.g. add_module_param rtl8193too debug=1
##################################################
add_module_param() {
- echo "options $1 $2" >> /etc/modprobe.d/options
+ echo "options $1 $2" >> /etc/modprobe.d/options.conf
}
##################################################
@@ -56,16 +56,14 @@
[ -e "$config" ] && . "$config"
# check if we should run the module
- condition="$(cat $file | sed -n '/%if: /p')"
- condition="${condition#*if: }"
+ condition="$(sed -rn 's/^#[[:blank:]]*%if:[[:blank:]]*(.*)$/\1/p' < $file)"
if [ "$condition" ]; then
if ! eval test $condition; then
continue
fi
fi
# remember dependent modules
- modules=$(cat $file | sed -n '/%modules: /p')
- modules="${modules#*les: }"
+ modules="$(sed -rn 's/^#[[:blank:]]*%modules:[[:blank:]]*(.*)$/\1/p' < $file)"
# run the module
[ "$debug" ] && echo "running $file"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/mkinitrd.changes new/mkinitrd-2.5.10/mkinitrd.changes
--- old/mkinitrd-2.5.9/mkinitrd.changes 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/mkinitrd.changes 2009-08-11 11:59:50.000000000 +0200
@@ -1,4 +1,73 @@
-------------------------------------------------------------------
+Tue Aug 11 11:58:25 CEST 2009 - mmarek@suse.cz
+
+- do not copy module parameters from /proc/cmdline, modprobe does
+ it itself.
+
+-------------------------------------------------------------------
+Tue Aug 11 11:55:15 CEST 2009 - mmarek@suse.cz
+
+- rename the temporary file /etc/modprobe.d/options to options.conf
+ as required by new module-init-tools.
+
+-------------------------------------------------------------------
+Wed Jul 15 15:34:38 CEST 2009 - mmarek@suse.cz
+
+- do not warn about built-in modules
+- prefix modprobe errors with "modprobe:" (less scary than "FATAL:")
+
+-------------------------------------------------------------------
+Thu Jul 2 08:53:25 CEST 2009 - hare@suse.de
+
+- Update version to 2.5.10
+
+-------------------------------------------------------------------
+Wed Jun 24 18:47:12 CEST 2009 - thomas@novell.com
+
+- only copy *.sh files to scripts directory
+
+-------------------------------------------------------------------
+Wed Jun 24 16:23:12 CEST 2009 - thomas@novell.com
+
+- only include scripts with .sh extension in rpm file to fix
+ build failure
+
+-------------------------------------------------------------------
+Tue Jun 23 07:38:22 CEST 2009 - thomas@novell.com
+
+- mounting /root/proc for SELinux (bnc#457984)
+
+-------------------------------------------------------------------
+Mon May 25 12:15:08 CEST 2009 - ro@suse.de
+
+- silence warning about rightfully non existing modprobe.conf
+
+-------------------------------------------------------------------
+Tue May 19 21:37:10 CEST 2009 - jeffm@suse.de
+
+- Added firmware rules to udev (bnc#494199)
+
+-------------------------------------------------------------------
+Mon May 4 17:53:55 CEST 2009 - werner@suse.de
+
+- Do not include binaries for bash builtins
+
+-------------------------------------------------------------------
+Wed Apr 29 17:41:38 CEST 2009 - werner@suse.de
+
+- Minor changes
+
+-------------------------------------------------------------------
+Tue Apr 28 16:10:31 CEST 2009 - werner@suse.de
+
+- sed is powerfull, use it instead using several pipes
+- use usleep for waiting on events
+- use the settimeofday feature to warp the system clock for
+ systems which use the localtime in the UTC
+- add scripts from aaa_base for loading rtc module and warp
+ the clock for systems with local time in RTC
+
+-------------------------------------------------------------------
Mon Feb 9 09:56:22 CET 2009 - bwalle@suse.de
- Implement temporary directory selection exactly as specified in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/mkinitrd.spec new/mkinitrd-2.5.10/mkinitrd.spec
--- old/mkinitrd-2.5.9/mkinitrd.spec 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/mkinitrd.spec 2009-08-11 11:59:50.000000000 +0200
@@ -57,6 +57,7 @@
%build
gcc $RPM_OPT_FLAGS -Wall -Os -o lib/mkinitrd/bin/run-init src/run-init.c
+gcc $RPM_OPT_FLAGS -Wall -Os -o lib/mkinitrd/bin/warpclock src/warpclock.c
make -C man
sed -i "s/@BUILD_DAY@/`env LC_ALL=C date -ud yesterday '+%Y%m%d'`/" sbin/mkinitrd
echo "Checking scripts:"
@@ -76,7 +77,7 @@
mkdir -p $RPM_BUILD_ROOT/lib/mkinitrd/scripts
mkdir -p $RPM_BUILD_ROOT/lib/mkinitrd/setup
mkdir -p $RPM_BUILD_ROOT/lib/mkinitrd/boot
-cp -a scripts $RPM_BUILD_ROOT/lib/mkinitrd
+cp -a scripts/*.sh $RPM_BUILD_ROOT/lib/mkinitrd/scripts/
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
@@ -105,7 +106,7 @@
%dir /lib/mkinitrd/boot
%dir /lib/mkinitrd/setup
%config /etc/rpm/macros.mkinitrd
-/lib/mkinitrd/scripts/*
+/lib/mkinitrd/scripts/*.sh
/lib/mkinitrd/bin/*
/sbin/mkinitrd
/sbin/mkinitrd_setup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/sbin/mkinitrd new/mkinitrd-2.5.10/sbin/mkinitrd
--- old/mkinitrd-2.5.9/sbin/mkinitrd 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/sbin/mkinitrd 2009-08-11 11:59:50.000000000 +0200
@@ -25,7 +25,7 @@
# git://git.opensuse.org/projects/mkinitrd.git
#
-VERSION=2.5.9
+VERSION=2.5.10
LOGDIR=/var/log/YaST2
LOGFILE=$LOGDIR/mkinitrd.log
declare -a cmd_option
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/boot-boot.sh new/mkinitrd-2.5.10/scripts/boot-boot.sh
--- old/mkinitrd-2.5.9/scripts/boot-boot.sh 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/boot-boot.sh 2009-08-11 11:59:50.000000000 +0200
@@ -16,8 +16,7 @@
# Move device nodes
/bin/mount --move /dev /root/dev
-/bin/mount /root/proc
-
+/bin/mount -t proc /root/proc /root/proc
# ready to leave
cd /root
umount /proc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/boot-clock.sh new/mkinitrd-2.5.10/scripts/boot-clock.sh
--- old/mkinitrd-2.5.9/scripts/boot-clock.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/boot-clock.sh 2009-08-11 11:59:50.000000000 +0200
@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+#%stage: boot
+#%depends: start rtc udev
+#%provides: clock
+#%dontshow
+
+if test -e /etc/sysconfig/clock -a -e /etc/localtime
+then
+ . /etc/sysconfig/clock
+ case "$HWCLOCK" in
+ *-l*) /bin/warpclock
+ esac
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/boot-devfunctions.sh new/mkinitrd-2.5.10/scripts/boot-devfunctions.sh
--- old/mkinitrd-2.5.9/scripts/boot-devfunctions.sh 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/boot-devfunctions.sh 2009-08-11 11:59:50.000000000 +0200
@@ -1,7 +1,7 @@
#!/bin/bash
#
#%stage: boot
-#
+#%programs: usleep
#%dontshow
#
##### Device functions
@@ -45,10 +45,12 @@
local root
local type
local retval=1
- local timeout=$udev_timeout
local dm_major
local udev_devn
local udev_major
+ local -i timeout
+
+ let timeout=$udev_timeout\*40
root=$1
type=$2
@@ -77,8 +79,8 @@
echo -n "!"
multipath -v0
wait_for_events
- sleep 1
- timeout=$(( $timeout - 1 ))
+ usleep 25000
+ let timeout--
continue;
fi
else
@@ -87,9 +89,9 @@
break;
fi
fi
- sleep 1
- echo -n "."
- timeout=$(( $timeout - 1 ))
+ usleep 25000
+ ((timeout % 40 == 1)) && echo -n "."
+ let timeout--
# Recheck for LVM volumes
if [ -n "$vg_root" -a -n "$vg_roots" ] ; then
vgscan
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/boot-rtc.sh new/mkinitrd-2.5.10/scripts/boot-rtc.sh
--- old/mkinitrd-2.5.9/scripts/boot-rtc.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/boot-rtc.sh 2009-08-11 11:59:50.000000000 +0200
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+#%stage: boot
+#%depends: start
+#%modules: rtc_cmos
+#%provides: rtc
+#%programs: /sbin/modprobe usleep
+#%if: -n "$(modprobe -C /dev/null --set-version $kernel_version --ignore-install --show-depends rtc_cmos 2>/dev/null)"
+#%dontshow
+
+if test ! -e /sys/class/rtc/rtc0
+then
+ load_modules
+ typeset -i rtccount=300
+ while ((rtccount-- > 0)) ; do
+ test -e /sys/class/rtc/rtc0 && break
+ usleep 10000
+ done
+ unset rtccount
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/boot-start.sh new/mkinitrd-2.5.10/scripts/boot-start.sh
--- old/mkinitrd-2.5.9/scripts/boot-start.sh 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/boot-start.sh 2009-08-11 11:59:50.000000000 +0200
@@ -2,7 +2,7 @@
#
#%stage: boot
#%depends: devfunctions
-#%programs: /bin/bash umount test mount mknod mkdir ln date sleep echo cat /bin/sed /sbin/insmod /sbin/modprobe kill /sbin/killall5 /sbin/halt /sbin/reboot /sbin/showconsole cp /sbin/pidof mv chmod rm true ls /lib/mkinitrd/bin/*
+#%programs: /bin/bash umount mount mknod mkdir ln date sleep cat /bin/sed /sbin/insmod /sbin/modprobe kill /sbin/killall5 /sbin/halt /sbin/reboot /sbin/showconsole cp /sbin/pidof mv chmod rm true ls /lib/mkinitrd/bin/*
#%modules: $RESOLVED_INITRD_MODULES
#%udevmodules: $RESOLVED_INITRD_MODULES_UDEV
#%dontshow
@@ -62,8 +62,8 @@
for o in $(cat /proc/cmdline); do
key="${o%%=*}"
key="${key//-/_}"
- if [ "${key%.*}" != "${key}" ]; then # module parameter
- add_module_param "${key%.*}" "${o#*.}"
+ if [ "${key%.*}" != "${key}" ]; then
+ : # module parameter, ignored
else
# environment variable
# set local variables too, in case somehow the kernel does not do this correctly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/setup-clock.sh new/mkinitrd-2.5.10/scripts/setup-clock.sh
--- old/mkinitrd-2.5.9/scripts/setup-clock.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/setup-clock.sh 2009-08-11 11:59:50.000000000 +0200
@@ -0,0 +1,20 @@
+#!/bin/bash
+#%stage: boot
+#%depends: prepare
+
+if test -e /etc/localtime
+then
+ mkdir -m 0755 -p $tmp_mnt/etc
+ cp -p /etc/localtime $tmp_mnt/etc/
+fi
+if test -e /usr/share/zoneinfo/UTC
+then
+ mkdir -m 0755 -p $tmp_mnt/usr/share/zoneinfo
+ cp -p /usr/share/zoneinfo/UTC $tmp_mnt/usr/share/zoneinfo/
+fi
+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
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/setup-modules.sh new/mkinitrd-2.5.10/scripts/setup-modules.sh
--- old/mkinitrd-2.5.9/scripts/setup-modules.sh 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/setup-modules.sh 2009-08-11 11:59:50.000000000 +0200
@@ -301,12 +301,13 @@
-C /dev/null \
--set-version $kernel_version --ignore-install \
--show-depends $module \
- $additional_args \
- | sed -ne 's:.*insmod /\?::p' | sed -ne 's:\ .*\?::p' )
- if [ ! "$module_list" ]; then
+ $additional_args 2> >(sed 's/^FATAL:/modprobe:/' >&2) \
+ | grep -E '^(insmod|builtin) ')
+ if [ -z "$module_list" ]; then
echo \
"WARNING: no dependencies for kernel module '$module' found." >&2
fi
+ module_list=$(echo "$module_list" | sed -rn 's/^insmod +//p')
for mod in $module_list ; do
if ! $(echo $resolved_modules | grep -q $mod) ; then
resolved_modules="$resolved_modules $mod"
@@ -343,7 +344,7 @@
for script in $INITRD_PATH/boot/*.sh; do
if use_script "$script"; then # only include the modules if the script gets used
verbose -n ""
- for module in $(cat $script | egrep '%udevmodules: |%modules: ' | sed 's/^.*s: \(.*\)$/\1/'); do
+ for module in $(sed -rn 's/^#[[:blank:]]*%(udevmodules|modules):[[:blank:]]*(.*)$/\2/p' < $script); do
[ "$module" ] && verbose "[MODULES]\t$(basename $script): $(eval echo $module)"
add_module $(eval echo $module)
done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/setup-prepare.sh new/mkinitrd-2.5.10/scripts/setup-prepare.sh
--- old/mkinitrd-2.5.9/scripts/setup-prepare.sh 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/setup-prepare.sh 2009-08-11 11:59:50.000000000 +0200
@@ -146,8 +146,10 @@
# Add modprobe, modprobe.conf*, and a version of /bin/true: modprobe.conf
# might use it.
-cp -r $root_dir/etc/modprobe.conf $root_dir/etc/modprobe.conf.local \
- $root_dir/etc/modprobe.d $tmp_mnt/etc
+for mod in $root_dir/etc/modprobe.conf $root_dir/etc/modprobe.conf.local \
+ $root_dir/etc/modprobe.d ; do
+ test -e $mod && cp -r $mod $tmp_mnt/etc
+done
cat > $tmp_mnt/bin/true <<-EOF
#! /bin/sh
:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/setup-progs.sh new/mkinitrd-2.5.10/scripts/setup-progs.sh
--- old/mkinitrd-2.5.9/scripts/setup-progs.sh 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/setup-progs.sh 2009-08-11 11:59:50.000000000 +0200
@@ -10,7 +10,7 @@
file="${script##*/}"
feature="${file#*-}"
feature="${feature%.sh}"
- if [ ! "$(cat $script | grep '%dontshow')" ]; then
+ if ! grep -q '%dontshow' < "$script" ; then
features="$features $feature"
fi
# copy the script itself
@@ -21,16 +21,16 @@
[ -e "config/${file#*-}" ] && cat "config/${file#*-}" >> run_all.sh
# echo "[ -e "config/${file#*-}" ] && . \"config/${file#*-}\"" >> run_all.sh
# -- check if we should run the module
- condition="$(sed -n 's/^#%if:\(.*\)$/if [ \1 ]; then/p' "$script")"
+ condition="$(sed -rn 's/^#[[:blank:]]*%if:[[:blank:]]*(.*)$/if [ \1 ]; then/p' < "$script")"
echo "$condition" >> run_all.sh
# -- remember dependent modules
- sed -n 's/^#%modules:\(.*\)$/modules="\1"/p' $script >> run_all.sh
+ sed -rn 's/^#[[:blank:]]*%modules:[[:blank:]]*(.*)$/modules="\1"/p' < $script >> run_all.sh
echo "[ \"\$debug\" ] && echo running $file
source boot/$file
[ \"\$modules\" ] && load_modules" >> run_all.sh
[ "$condition" ] && echo "fi" >> run_all.sh
# and all programs it needs
- for files in $(cat $script | grep '%programs: ' | sed 's/^#%programs: \(.*\)$/\1/'); do
+ for files in $(sed -rn 's/^#[[:blank:]]*%programs:[[:blank:]]*(.*)$/\1/p' < "$script"); do
for file in $(eval echo $files); do
if [ "${file:0:17}" = "/lib/mkinitrd/bin" ]; then
SOURCE=$file
@@ -40,7 +40,10 @@
[ ! -e $file -a -e /usr$file ] && SOURCE="/usr$file"
DEST=".$file"
else
- SOURCE=$(which "$file")
+ case "$(type -t "$file")" in
+ builtin) continue
+ esac
+ SOURCE=$(type -p "$file")
DEST="./bin/"
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/setup-udev.sh new/mkinitrd-2.5.10/scripts/setup-udev.sh
--- old/mkinitrd-2.5.9/scripts/setup-udev.sh 2009-06-23 11:02:37.000000000 +0200
+++ new/mkinitrd-2.5.10/scripts/setup-udev.sh 2009-08-11 11:59:50.000000000 +0200
@@ -13,6 +13,7 @@
for rule in \
05-udev-early.rules \
50-udev-default.rules \
+ 50-firmware.rules \
59-dasd.rules \
60-persistent-storage.rules \
60-persistent-input.rules \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/scripts/setup-udev.sh.orig new/mkinitrd-2.5.10/scripts/setup-udev.sh.orig
--- old/mkinitrd-2.5.9/scripts/setup-udev.sh.orig 2009-02-09 09:58:03.000000000 +0100
+++ new/mkinitrd-2.5.10/scripts/setup-udev.sh.orig 1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-#!/bin/bash
-#
-#%stage: setup
-#%depends: start
-#
-
-# Default udev timeout is 30 seconds
-udev_timeout=30
-
-mkdir -p $tmp_mnt/lib/udev/rules.d
-mkdir -p $tmp_mnt/etc/udev/rules.d
-# copy needed rules
-for rule in \
- 05-udev-early.rules \
- 50-udev-default.rules \
- 59-dasd.rules \
- 60-persistent-storage.rules \
- 60-persistent-input.rules \
- 62-dm_linear.rules \
- 64-device-mapper.rules \
- 64-md-raid.rules \
- 80-drivers.rules; do
- if [ -f /lib/udev/rules.d/$rule ]; then
- cp /lib/udev/rules.d/$rule $tmp_mnt/lib/udev/rules.d
- elif [ -f /etc/udev/rules.d/$rule ]; then
- cp /etc/udev/rules.d/$rule $tmp_mnt/etc/udev/rules.d
- fi
-done
-# copy helper
-mkdir -p $tmp_mnt/lib/udev
-for script in /lib/udev/* /sbin/*_id ; do
- if [ ! -d "$script" ] && [ -x "$script" ] ; then
- cp_bin $script ${tmp_mnt}${script}
- elif [ -f "$script" ] ; then
- cp -pL $script ${tmp_mnt}${script}
- fi
-done
-
-save_var udev_timeout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.9/src/warpclock.c new/mkinitrd-2.5.10/src/warpclock.c
--- old/mkinitrd-2.5.9/src/warpclock.c 1970-01-01 01:00:00.000000000 +0100
+++ new/mkinitrd-2.5.10/src/warpclock.c 2009-08-11 11:59:50.000000000 +0200
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2009 Werner Fink, 2009 SuSE LINUX Products GmbH, Germany.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Author: Werner Fink
+ *
+ * Based on a comment of the manual page settimeofday(2):
+ *
+ * Under Linux there are some peculiar "warp clock" semantics associated
+ * with the settimeofday() system call if on the very first call (after
+ * booting) that has a non-NULL tz argument, the tv argument is NULL and
+ * the tz_minuteswest field is non-zero. In such a case it is assumed
+ * that the CMOS clock is on local time, and that it has to be incremented
+ * by this amount to get UTC system time. No doubt it is a bad idea to
+ * use this feature.
+ *
+ * From linux/kernel/time.c
+ *
+ * The best thing to do is to keep the CMOS clock in universal time (UTC)
+ * as real UNIX machines always do it. This avoids all headaches about
+ * daylight saving times and warping kernel clocks.
+ *
+ * In case for some reason the CMOS clock has not already been running
+ * in UTC, but in some local time: The first time we set the timezone,
+ * we will warp the clock so that it is ticking UTC time instead of
+ * local time. Presumably, if someone is setting the timezone then we
+ * are running in an environment where the programs understand about
+ * timezones. This should be done at boot time in the /etc/rc script,
+ * as soon as possible, so that the clock can be set right. Otherwise,
+ * various programs will get confused when the clock gets warped.
+ *
+ * As some systems, e.g. in a multi boot environment, have their RTC set to
+ * local time we may depend on this feature. For Windows[tm] users it
+ * would be very interesting to read the comments from Markus Kuhn at
+ * http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html
+ *
+ * The kernel assumes that the RTC/HW clock is running in Universal time
+ * and use at boot RTC to sets the kernel based System Time also in UTC.
+ * this leads to problems on systems with RTC running in local time.
+ * Therefore we have to warp the kernel based System Time back to run UTC.
+ *
+ * This program checks /etc/sysconfig/clock on a SuSE based Linux System
+ * if the RTC/HW clock is running in local time. It also determine the
+ * current offset from UTC in minutes west of the Universal time line.
+ *
+ * All user space programs assume that kernel based System Time is set to
+ * UTC to be able to calculate their own time zone offset on that unique
+ * base. That is that e.g. date(1) use this System Time together with
+ * /etc/localtime or the environment variable TZ to appoint the actual
+ * local time (zone). To see this simply run
+ *
+ * date --rfc-2822
+ *
+ * and check the time zone offset of the local time marked with `+'.
+ */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+int main()
+{
+ FILE * conf;
+ const char * err;
+ struct tm *utc, *local;
+ char buffer[LINE_MAX];
+ struct timezone zone;
+ time_t now, delta, gmtoff;
+ struct stat st;
+ int universal = 1;
+ int count;
+
+ err = "warpclock: /etc/localtime";
+ if (stat("/etc/localtime", &st) < 0)
+ goto err;
+ clearenv(); /* Ignore e.g. TZ */
+ tzset(); /* Open /etc/localtime */
+
+ memset(&zone, 0, sizeof(struct timezone));
+
+ 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))
+ ptr++;
+ if (*ptr == '#')
+ continue;
+ if (*ptr == '\n')
+ continue;
+ if (strncmp("HWCLOCK=", ptr, 8) == 0) {
+ universal = !strstr(ptr, "-l");
+ break;
+ }
+ }
+ fclose(conf);
+
+ if (universal)
+ goto out;
+
+ count = 300;
+ errno = EFAULT;
+ err = "warpclock: system time not synched";
+ while ((now = time(NULL)) < 60 * 60) {
+ if ((now == (time_t)-1) || (count-- <= 0))
+ goto err;
+ usleep(10000); /* Wait on the System Time */
+ }
+
+ errno = EINVAL;
+ err = "warpclock: localtime()";
+ if ((local = localtime(&now)) == (struct tm *)0)
+ goto err;
+ gmtoff = (time_t)local->tm_gmtoff;
+
+ errno = EINVAL;
+ err = "warpclock: gmtime()";
+ if ((utc = gmtime(&now)) == (struct tm *)0)
+ goto err;
+ delta = mktime(utc) - now;
+
+#if 0
+ /*
+ * As long as we have no chance to use tm_isdst from the RTC
+ * aka HW CMOS clock, we are not able to determine if the
+ * Dayligth Saving Time (DST)
+ * mode has changed between to system boots. If the Linux
+ * kernel would use and export the DST flag bit of the RTC
+ * it could be used to check if DST mode has changed and we
+ * could determine the offset required for the correct
+ * System Time and clear or set the DST flag bit of the RTC.
+ */
+
+ if (rtc->tm_isdst != local->tm_isdst) { /* DST <-> Normal Time */
+ if (!local->tm_isdst) {
+ const time_t dstoff = gmtoff + delta;
+ gmtoff += dstoff; /* DST -> Normal Time */
+ } else {
+ const time_t dstoff = gmtoff + delta;
+ gmtoff -= dstoff; /* DST <- Normal Time */
+ }
+ }
+#endif
+ if (gmtoff == 0)
+ goto out; /* Nothing todo */
+ zone.tz_minuteswest = -(typeof(zone.tz_minuteswest))(gmtoff/60L);
+
+ /* Warp System Time back to UTC */
+ err = "warpclock: warp system clock";
+ if (syscall(SYS_settimeofday, (struct timeval *)0, &zone) < 0)
+ goto err;
+ /* Reset time zone back to zero */
+out:
+ return 0;
+err:
+ fprintf(stderr, "%s: %s\n", err, strerror(errno));
+ return 1;
+}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org