Compare commits

...

11 Commits
master ... f21

Author SHA1 Message Date
Harald Hoyer 19a17acfd8 dracut-038-40.git20150819
- fix ldconfig paths
Resolves: rhbz#1253889
2015-08-19 13:27:29 +02:00
Harald Hoyer e1428ded1f dracut 038-39.git20150518
- add more input drivers
Resolves: rhbz#1135734 rhbz#1204392
- lvm: add cache tools for dm-cache usage
Resolves: rhbz#1184519
- add hyperv framebuffer module
Resolves: rhbz#1192035
- add amdkfd kernel module
Resolves: rhbz#1205222
- add sdhci-pci kernel module
Resolves: rhbz#1211480
2015-05-18 13:58:00 +02:00
Till Maas 0716a8025f Do not fsck on resum from hibernate
Resolves: rhbz#1174945
2015-03-06 12:49:07 +01:00
Harald Hoyer 2468975f3d dracut-038-32.git20141216
- fixed systemd journal in the initramfs
Resolves: rhbz#1174733
2014-12-16 12:57:06 +01:00
Harald Hoyer a450d0748a dracut-038-30.git20141204
- add 90-vconsole.rules
Resolves: rhbz#1150384
2014-12-04 11:59:31 +01:00
Zbigniew Jędrzejewski-Szmek f10a0b5e79 Fix for rhbz 1147941 2014-09-30 10:10:54 -04:00
Josh Boyer 2da1f98fe6 Enable early-microcode by default (rhbz 1083716) 2014-09-25 13:08:31 -04:00
Harald Hoyer f8d90ae7e4 dracut-038-28.git20140903
- more ARM modules
- fixed ifcfg for bridges
- fallback for persistent device names
- fixed cancel_wait_for_dev()
- more documentation
2014-09-03 14:09:40 +02:00
Peter Robinson 4716272eb6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 09:44:01 +00:00
Harald Hoyer 1d10e96320 dracut-038-14.git20140724
- fixed lvm modules issues
Resolves: rhbz#1118890
 fixed vlan issues
- fixed prelink for FIPS
- new rd.route parameter
- more ARM modules
2014-07-24 14:49:55 +02:00
Tom Callaway 9cbd50c7bf fix license handling 2014-07-11 17:55:03 -04:00
41 changed files with 2403 additions and 7 deletions

View File

@ -0,0 +1,24 @@
From 2bda2bed06fab49ef30feb1d042c1721dff5ad15 Mon Sep 17 00:00:00 2001
From: Alexander Tsoy <alexander@tsoy.me>
Date: Mon, 31 Mar 2014 17:56:13 +0400
Subject: [PATCH] modsign: do not hardcode path to keyctl
https://bugs.gentoo.org/show_bug.cgi?id=506094
(cherry picked from commit 8ca5e8c319c3e44bbd06d8c0da429d2df221707b)
---
modules.d/03modsign/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/03modsign/module-setup.sh b/modules.d/03modsign/module-setup.sh
index 09285d3..cc0e241 100755
--- a/modules.d/03modsign/module-setup.sh
+++ b/modules.d/03modsign/module-setup.sh
@@ -29,7 +29,7 @@ depends() {
# called by dracut
install() {
inst_dir /lib/modules/keys
- inst_binary /usr/bin/keyctl
+ inst_binary keyctl
inst_hook pre-trigger 01 "$moddir/load-modsign-keys.sh"

View File

@ -0,0 +1,41 @@
From 2f1589233e5aa80540dadb9433518ae1bde23a57 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 3 Jul 2014 15:04:17 +0200
Subject: [PATCH] lvm:module-setup.sh: check for existance of
69-dm-lvm-metad.rules
fixup for 12819a579900b9691e2bfaf14e76fbb025851530
(cherry picked from commit fecc1d69e5a12c305d93e7dca64bd690a1fe8ff5)
---
modules.d/90lvm/module-setup.sh | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index 00d4e5a..2f2b64c 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -80,13 +80,16 @@ install() {
inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules
# Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut!
- if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]] && \
- grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then
- sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
- sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
- sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
- else
- sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+ if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]]; then
+ if grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then
+ sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
+ ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+ sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+ sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+ else
+ sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
+ ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+ fi
fi
# Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules

View File

@ -0,0 +1,49 @@
From 4796fe1ffc9041687694c6c8707081e1f6956de9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Jul 2014 11:50:04 +0200
Subject: [PATCH] dracut.sh: always copy prelink files in FIPS mode
regardless of the the prelink={yes|no} switch
(cherry picked from commit 6cd7001b35c66a12787bc0943b9a7e83a3d443c0)
---
dracut.sh | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index c6da411..22273a5 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1400,20 +1400,18 @@ if [[ $kernel_only != yes ]]; then
fi
fi
-if [[ $do_prelink == yes ]]; then
- PRELINK_BIN="$(command -v prelink)"
- if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then
- if [[ $DRACUT_FIPS_MODE ]]; then
- dinfo "*** Installing prelink files ***"
- inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache
- else
- dinfo "*** Pre-linking files ***"
- inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf
- chroot "$initdir" "$PRELINK_BIN" -a
- rm -f -- "$initdir/$PRELINK_BIN"
- rm -fr -- "$initdir"/etc/prelink.*
- dinfo "*** Pre-linking files done ***"
- fi
+PRELINK_BIN="$(command -v prelink)"
+if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then
+ if [[ $DRACUT_FIPS_MODE ]]; then
+ dinfo "*** Installing prelink files ***"
+ inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache
+ elif [[ $do_prelink == yes ]]; then
+ dinfo "*** Pre-linking files ***"
+ inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf
+ chroot "$initdir" "$PRELINK_BIN" -a
+ rm -f -- "$initdir/$PRELINK_BIN"
+ rm -fr -- "$initdir"/etc/prelink.*
+ dinfo "*** Pre-linking files done ***"
fi
fi

View File

@ -0,0 +1,36 @@
From 60ba72a5efdcaad6d0bde9e3b82bc35aa2441629 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Jul 2014 11:50:51 +0200
Subject: [PATCH] plymouth: also find the pkglibdir on debian
(cherry picked from commit 4adeefc4abb8fb1d83e483d12da6b337c486fded)
---
modules.d/50plymouth/module-setup.sh | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
index b818324..33fab11 100755
--- a/modules.d/50plymouth/module-setup.sh
+++ b/modules.d/50plymouth/module-setup.sh
@@ -15,12 +15,18 @@ depends() {
# called by dracut
install() {
- if grep -q nash /usr/libexec/plymouth/plymouth-populate-initrd \
- || [ ! -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
+ PKGLIBDIR="/usr/lib/plymouth"
+ if type -P dpkg-architecture &>/dev/null; then
+ PKGLIBDIR="/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth"
+ fi
+ [ -x /usr/libexec/plymouth/plymouth-populate-initrd ] && PKGLIBDIR="/usr/libexec/plymouth"
+
+ if grep -q nash ${PKGLIBDIR}/plymouth-populate-initrd \
+ || [ ! -x ${PKGLIBDIR}/plymouth-populate-initrd ]; then
. "$moddir"/plymouth-populate-initrd.sh
else
PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \
- /usr/libexec/plymouth/plymouth-populate-initrd -t "$initdir"
+ ${PKGLIBDIR}/plymouth-populate-initrd -t "$initdir"
fi
inst_hook emergency 50 "$moddir"/plymouth-emergency.sh

View File

@ -0,0 +1,30 @@
From 5034a6411142e2eede3200acf0a50feb8248742f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Jul 2014 12:54:21 +0200
Subject: [PATCH] dracut-functions.sh: speed up ldconfig_paths()
(cherry picked from commit 5ea0be0a8c83969fd0041b3e647f82fcfb365e44)
---
dracut-functions.sh | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index d30e835..9f481b2 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -109,12 +109,11 @@ ldconfig_paths()
local a i
declare -A a
for i in $(
- ldconfig -pN 2>/dev/null | while read a b c d; do
- [[ "$c" != "=>" ]] && continue
- printf "%s\n" ${d%/*};
+ ldconfig -pN 2>/dev/null | grep -F '=>' | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | while read a b c d; do
+ d=${d%/*}
+ printf "%s\n" "$d";
done
); do
- [[ "$i" = "/lib" || "$i" = "/usr/lib" || "$i" = "/lib64" || "$i" = "/usr/lib64" ]] && continue
a["$i"]=1;
done;
printf "%s\n" ${!a[@]}

View File

@ -0,0 +1,43 @@
From 633a3f01e0046072aa67eeb072d38256e0be8abe Mon Sep 17 00:00:00 2001
From: "Praveen_Paladugu@Dell.com" <Praveen_Paladugu@Dell.com>
Date: Tue, 10 Jun 2014 10:35:16 -0500
Subject: [PATCH] Installing an OS with VLAN enabled to an ISCSI LUN (from
ibft)
When installing OS to a VLAN enabled iscsi LUN (extracted from iBFT), "/tmp/net.{xyz}.has_ibft_config" is not being set properly.
Then anaconda installer requires 'BOOTPROTO="ibft"' populated in ifcfg of the vlan interface (ex: ibft0.20), for it to properly populate the kernel parameters post installation. The setting 'BOOTPROTO="ibft"' is populated by write-ifcfg.sh script only if the corresponding interface has a file /tmp/net.{xyz}.has_inft_config
To get around this issue, in ibft_to_cmdline() function in net-lib.sh file, I made the following changes to populate the has_ibft_config file for the vlan interface(ex: ibft0.20):
(cherry picked from commit f4eb0d98048d51a0782d4a7137f699de174a65e4)
---
modules.d/40network/net-lib.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index a82f1a8..f8e1179 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -233,15 +233,20 @@ ibft_to_cmdline() {
case "$vlan" in
[0-9]*)
echo "vlan=$dev.$vlan:$dev"
+ echo $mac > /tmp/net.${dev}.${vlan}.has_ibft_config
;;
*)
echo "vlan=$vlan:$dev"
+ echo $mac > /tmp/net.${vlan}.has_ibft_config
;;
esac
+ else
+ echo $mac > /tmp/net.${dev}.has_ibft_config
fi
+ else
+ echo $mac > /tmp/net.${dev}.has_ibft_config
fi
- echo $mac > /tmp/net.${dev}.has_ibft_config
done
) >> /etc/cmdline.d/40-ibft.conf
}

View File

@ -0,0 +1,95 @@
From 1bc8700c7d8a3a3caa3a5027a4d1f0f60b49ef41 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 21 Jul 2014 16:58:15 +0200
Subject: [PATCH] dracut-functions.sh: fix inst*() functions for "-H" handling
because some inst*() functions check the existance of the source files
and do not know about the "-H" option, some failed to install the
hostonly files.
(cherry picked from commit 4ef45f13f4d11c86c4c8c3fd8d8a6be2c5b4deef)
---
dracut-functions.sh | 46 ++++++++++++++++++++++++++++++++--------------
1 file changed, 32 insertions(+), 14 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 9f481b2..6cdfea0 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -760,33 +760,46 @@ inst_dir() {
}
inst() {
+ local _hostonly_install
+ if [[ "$1" == "-H" ]]; then
+ _hostonly_install="-H"
+ shift
+ fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
- #dinfo "$DRACUT_INSTALL -l $@"
- $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
+ $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
}
inst_simple() {
+ local _hostonly_install
+ if [[ "$1" == "-H" ]]; then
+ _hostonly_install="-H"
+ shift
+ fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
[[ -e $1 ]] || return 1 # no source
- $DRACUT_INSTALL ${initdir:+-D "$initdir"} "$@"
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} "$@" || :
+ $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${_hostonly_install:+-H} "$@"
+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${_hostonly_install:+-H} "$@" || :
}
inst_symlink() {
+ local _hostonly_install
+ if [[ "$1" == "-H" ]]; then
+ _hostonly_install="-H"
+ shift
+ fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
[[ -L $1 ]] || return 1
- $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
+ $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
}
inst_multiple() {
- local ret
- #dinfo "initdir=$initdir $DRACUT_INSTALL -l $@"
+ local _ret
$DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
- ret=$?
- (($ret != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
- return $ret
+ _ret=$?
+ (($_ret != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
+ return $_ret
}
dracut_install() {
@@ -794,10 +807,15 @@ dracut_install() {
}
inst_library() {
+ local _hostonly_install
+ if [[ "$1" == "-H" ]]; then
+ _hostonly_install="-H"
+ shift
+ fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
[[ -e $1 ]] || return 1 # no source
- $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
+ $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
+ (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
}
inst_binary() {

View File

@ -0,0 +1,28 @@
From d246d2dbfd24cd77ac24124ad06328a5bfcdd975 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sun, 20 Jul 2014 22:20:04 +0100
Subject: [PATCH] ARM: update modules for ARM host only options
(cherry picked from commit 611c895772c73ebb5f769942bca5d5991adc169e)
---
modules.d/90kernel-modules/module-setup.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index cc79b88..1ce133f 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -51,9 +51,10 @@ installkernel() {
if [[ "$(uname -p)" == arm* ]]; then
# arm specific modules
- hostonly='' instmods omapdrm panel-tfp410
- instmods i2c-tegra gpio-regulator as3722-regulator \
- phy-tegra-usb ehci-tegra sdhci-tegra
+ hostonly='' instmods \
+ connector-hdmi connector-dvi encoder-tfp410 \
+ encoder-tpd12s015 i2c-tegra gpio-regulator \
+ as3722-regulator orion-ehci ehci-tegra
fi
# install virtual machine support

View File

@ -0,0 +1,41 @@
From 9e67de971f004b962e8f19f08e19be2f82d53787 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 22 Jul 2014 11:51:08 +0200
Subject: [PATCH] base/dracut-lib:pidof() turn off debugging
(cherry picked from commit ad8638e04e4ac3641afee0e273c91aa3fb6d4278)
---
modules.d/99base/dracut-lib.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index a77b843..abcebf5 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -991,13 +991,17 @@ wait_for_loginit()
# pidof version for root
if ! command -v pidof >/dev/null 2>/dev/null; then
pidof() {
+ debug_off
local _cmd
local _exe
local _rl
local _ret=1
local i
_cmd="$1"
- [ -z "$_cmd" ] && return 1
+ if [ -z "$_cmd" ]; then
+ debug_on
+ return 1
+ fi
_exe=$(type -P "$1")
for i in /proc/*/exe; do
[ -e "$i" ] || continue
@@ -1011,6 +1015,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
echo ${i##/proc/}
_ret=0
done
+ debug_on
return $_ret
}
fi

View File

@ -0,0 +1,126 @@
From 6bd6e92f0c54a8fd7e9b57aaf1dc343f1b845445 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 22 Jul 2014 11:03:56 +0200
Subject: [PATCH] network: add rd.route parameter
(cherry picked from commit 7b46244bb94e3dfd635a8d222044ae7fc920240d)
---
dracut.cmdline.7.asc | 15 +++++++++++++-
modules.d/40network/net-lib.sh | 42 ++++++++++++++++++++++++++++++++++++++++
modules.d/45ifcfg/write-ifcfg.sh | 3 +++
3 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index fef13b3..f66bace 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
@@ -493,6 +493,19 @@ WARNING: Do **not** use the default kernel naming scheme for the interface name,
as it can conflict with the kernel names. So, don't use "eth[0-9]+" for the
interface name. Better name it "bootnet" or "bluesocket".
+**rd.route=**__<net>__/__<netmask>__:__<gateway>__[:__<interface>__]::
+ Add a static route with route options, which are separated by a colon.
+ IPv6 addresses have to be put in brackets.
++
+[listing]
+.Example
+--
+ rd.route=192.168.200.0/24:192.168.100.222:ens10
+ rd.route=192.168.200.0/24:192.168.100.222
+ rd.route=192.168.200.0/24::ens10
+ rd.route=[2001:DB8:3::/8]:[2001:DB8:2::1]:ens10
+--
+
**bootdev=**__<interface>__::
specify network interface to use routing and netroot information from.
Required if multiple ip= lines are used.
@@ -540,7 +553,7 @@ NFS
~~~
**root=**\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__]::
mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given, use
- dhcp next_server. if server-ip is an IPv6 address it has to be put in
+ dhcp next_server. If server-ip is an IPv6 address it has to be put in
brackets, e.g. [2001:DB8::1]. NFS options can be appended with the prefix
":" or "," and are seperated by ",".
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index f8e1179..c118c53 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -89,6 +89,7 @@ ifdown() {
setup_net() {
local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES=""
+ local _p
[ -e /tmp/net.$netif.did-setup ] && return
[ -e /sys/class/net/$netif/address ] && \
[ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && return
@@ -103,6 +104,20 @@ setup_net() {
[ -e /tmp/net.$netif.resolv.conf ] && \
cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf
+ # add static route
+ for _p in $(getargs rd.route); do
+ route_to_var "$_p" || continue
+ [ -n "$route_dev" ] && [ "$route_dev" != "$netif"] && continue
+ ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"}
+ if strstr ":" "$route_mask"; then
+ printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \
+ > /tmp/net.route6."$netif"
+ else
+ printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \
+ > /tmp/net.route."$netif"
+ fi
+ done
+
# Handle STP Timeout: arping the default gateway.
# (or the root server, if a) it's local or b) there's no gateway.)
# Note: This assumes that if no router is present the
@@ -400,6 +415,33 @@ ip_to_var() {
fi
}
+route_to_var() {
+ local v=${1}:
+ local i
+ set --
+ while [ -n "$v" ]; do
+ if [ "${v#\[*:*:*\]:}" != "$v" ]; then
+ # handle IPv6 address
+ i="${v%%\]:*}"
+ i="${i##\[}"
+ set -- "$@" "$i"
+ v=${v#\[$i\]:}
+ else
+ set -- "$@" "${v%%:*}"
+ v=${v#*:}
+ fi
+ done
+
+ unset route_mask route_gw route_dev
+ case $# in
+ 2) [ -n "$1" ] && route_mask="$1"; [ -n "$2" ] && route_gw="$2"
+ return 0;;
+ 3) [ -n "$1" ] && route_mask="$1"; [ -n "$2" ] && route_gw="$2"; [ -n "$3" ] && route_dev="$3"
+ return 0;;
+ *) return 1;;
+ esac
+}
+
parse_ifname_opts() {
local IFS=:
set $1
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index 803ae8e..7e301de 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -268,6 +268,9 @@ for netup in /tmp/net.*.did-setup ; do
echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif
i=$((i+1))
done
+
+ [ -f /tmp/net.route6."$netif" ] && cp /tmp/net.route6."$netif" /tmp/ifcfg/route6-"$netif"
+ [ -f /tmp/net.route."$netif" ] && cp /tmp/net.route."$netif" /tmp/ifcfg/route-"$netif"
done
# Pass network opts

View File

@ -0,0 +1,130 @@
From 1b59bfd24181d7cbf1a2f84c6fc9e1033bac1265 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 22 Jul 2014 14:09:06 +0200
Subject: [PATCH] add "--install-optional" and install_optional_items
(cherry picked from commit 54b68829b60bc3f4c28cfca1ab0336584fe1e74c)
---
dracut-bash-completion.sh | 4 ++--
dracut.8.asc | 3 +++
dracut.conf.5.asc | 4 ++++
dracut.conf.d/fedora.conf.example | 2 +-
dracut.sh | 13 +++++++++++++
5 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh
index 9f359c6..feced60 100644
--- a/dracut-bash-completion.sh
+++ b/dracut-bash-completion.sh
@@ -40,7 +40,7 @@ _dracut() {
--omit-drivers --modules --omit --drivers --filesystems --install
--fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
--kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix
- --kernel-cmdline --sshkey --persistent-policy'
+ --kernel-cmdline --sshkey --persistent-policy --install-optional'
)
if __contains_word "$prev" ${OPTS[ARG]}; then
@@ -49,7 +49,7 @@ _dracut() {
comps=$(compgen -d -- "$cur")
compopt -o filenames
;;
- -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install)
+ -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install|--install-optional)
comps=$(compgen -f -- "$cur")
compopt -o filenames
;;
diff --git a/dracut.8.asc b/dracut.8.asc
index 14ce26b..51a4e9f 100644
--- a/dracut.8.asc
+++ b/dracut.8.asc
@@ -349,6 +349,9 @@ example:
----
===============================
+**--install-optional** _<file list>_::
+ install the space separated list of files into the initramfs, if they exist.
+
**--gzip**::
Compress the generated initramfs using gzip. This will be done by default,
unless another compression option or --no-compress is passed. Equivalent to
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
index be62da9..0b6be6a 100644
--- a/dracut.conf.5.asc
+++ b/dracut.conf.5.asc
@@ -66,6 +66,10 @@ Configuration files must have the extension .conf; other extensions are ignored.
*install_items+=*" __<file>__[ __<file>__ ...] "::
Specify additional files to include in the initramfs, separated by spaces.
+*install_optional_items+=*" __<file>__[ __<file>__ ...] "::
+ Specify additional files to include in the initramfs, separated by spaces,
+ if they exist.
+
*do_strip=*"__{yes|no}__"::
Strip binaries in the initramfs (default=yes)
diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example
index 495e8fb..c06202b 100644
--- a/dracut.conf.d/fedora.conf.example
+++ b/dracut.conf.d/fedora.conf.example
@@ -6,7 +6,7 @@ i18n_default_font="latarcyrheb-sun16"
i18n_install_all="yes"
stdloglvl=3
sysloglvl=5
-install_items+=" vi /etc/virc ps grep cat rm "
+install_optional_items+=" vi /etc/virc ps grep cat rm "
prefix="/"
systemdutildir=/usr/lib/systemd
systemdsystemunitdir=/usr/lib/systemd/system
diff --git a/dracut.sh b/dracut.sh
index 22273a5..3e1bf44 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -158,6 +158,8 @@ Creates initial ramdisk images for preloading modules
in the final initramfs.
-I, --install [LIST] Install the space separated list of files into the
initramfs.
+ --install-optional [LIST] Install the space separated list of files into the
+ initramfs, if they exist.
--gzip Compress the generated initramfs using gzip.
This will be done by default, unless another
compression option or --no-compress is passed.
@@ -305,6 +307,7 @@ rearrange_params()
--long drivers: \
--long filesystems: \
--long install: \
+ --long install-optional: \
--long fwdir: \
--long libdirs: \
--long fscks: \
@@ -469,6 +472,9 @@ while :; do
-d|--drivers) push drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--filesystems) push filesystems_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
-I|--install) push install_items_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
+ --install-optional)
+ push install_optional_items_l \
+ "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--fwdir) push fw_dir_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--libdirs) push libdirs_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--fscks) push fscks_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
@@ -716,6 +722,12 @@ if (( ${#install_items_l[@]} )); then
done
fi
+if (( ${#install_optional_items_l[@]} )); then
+ while pop install_optional_items_l val; do
+ install_optional_items+=" $val "
+ done
+fi
+
# these options override the stuff in the config file
if (( ${#dracutmodules_l[@]} )); then
dracutmodules=''
@@ -1317,6 +1329,7 @@ fi
if [[ $kernel_only != yes ]]; then
(( ${#install_items[@]} > 0 )) && inst_multiple ${install_items[@]}
+ (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o ${install_optional_items[@]}
[[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf"

View File

@ -0,0 +1,32 @@
From 4493d2b8ebd44c0319789e1e421e39499bcf27f6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 22 Jul 2014 14:22:21 +0200
Subject: [PATCH] test/TEST-30-ISCSI: add rd.shell to client root
(cherry picked from commit ece72160cedbe47b973a7925d5e2f5adc409a849)
---
test/TEST-30-ISCSI/client-init.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/TEST-30-ISCSI/client-init.sh b/test/TEST-30-ISCSI/client-init.sh
index e78db27..b3e2ee1 100755
--- a/test/TEST-30-ISCSI/client-init.sh
+++ b/test/TEST-30-ISCSI/client-init.sh
@@ -1,6 +1,8 @@
#!/bin/sh
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
exec >/dev/console 2>&1
+strstr() { [ "${1##*"$2"*}" != "$1" ]; }
+CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
export TERM=linux
export PS1='initramfs-test:\w\$ '
stty sane
@@ -11,4 +13,8 @@ while read dev fs fstype opts rest; do
break
done < /proc/mounts
#sh -i
+if strstr "$CMDLINE" "rd.shell"; then
+ strstr "$(setsid --help)" "control" && CTTY="-c"
+ setsid $CTTY sh -i
+fi
poweroff -f

View File

@ -0,0 +1,64 @@
From cf250699a9890399496276cbe81791932edfef8f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 22 Jul 2014 14:43:33 +0200
Subject: [PATCH] dracut.sh: add DRACUT_PATH
DRACUT_PATH can now be used to specify the PATH used by dracut
to search for binaries instead of the default
/usr/sbin:/sbin:/usr/bin:/bin
This should be set in the distribution config file
/usr/lib/dracut/dracut.conf.d/01-dist.conf
(cherry picked from commit eab9b75c8a9b106d2f35faae0af51ab1c66e8da1)
---
dracut.sh | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 3e1bf44..1844336 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -626,21 +626,10 @@ if ! [[ $outfile ]]; then
fi
fi
-for i in /usr/sbin /sbin /usr/bin /bin; do
- rl=$i
- if [ -L "$i" ]; then
- rl=$(readlink -f $i)
- fi
- if [[ "$NPATH" != *:$rl* ]] ; then
- NPATH+=":$rl"
- fi
-done
-export PATH="${NPATH#:}"
unset LC_MESSAGES
unset LC_CTYPE
export LC_ALL=C
export LANG=C
-unset NPATH
unset LD_LIBRARY_PATH
unset LD_PRELOAD
unset GREP_OPTIONS
@@ -685,6 +674,20 @@ for f in $(dropindirs_sort ".conf" "$confdir" "$dracutbasedir/dracut.conf.d"); d
[[ -e $f ]] && . "$f"
done
+DRACUT_PATH=${DRACUT_PATH:-/usr/sbin /sbin /usr/bin /bin}
+
+for i in $DRACUT_PATH; do
+ rl=$i
+ if [ -L "$i" ]; then
+ rl=$(readlink -f $i)
+ fi
+ if [[ "$NPATH" != *:$rl* ]] ; then
+ NPATH+=":$rl"
+ fi
+done
+export PATH="${NPATH#:}"
+unset NPATH
+
# these optins add to the stuff in the config file
if (( ${#add_dracutmodules_l[@]} )); then
while pop add_dracutmodules_l val; do

View File

@ -0,0 +1,31 @@
From 2b8143190e6e5e50d7fa54b38e6752aafb39ebbf Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 22:04:37 +0200
Subject: [PATCH] Test soc path for modalias needed by drm
On ARM, both pci and soc path can be tested for drm.
With this patchset, that was missing in recent kernel,
the tegra_drm case is not needed anymore:
http://patchwork.ozlabs.org/patch/361765/
http://www.spinics.net/lists/linux-tegra/msg17948.html
(cherry picked from commit 4a3f3ba68c73707231bba72cdf7ab01464456e5a)
(cherry picked from commit a03ed61ef577f57e255c6f752eb9344b3d5dc9e9)
---
modules.d/50drm/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index e25fc9f..9a48aaf 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -57,7 +57,7 @@ installkernel() {
# as we could e.g. be in the installer; nokmsboot boot parameter will disable
# loading of the driver if needed
if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \
- | grep -qxf - /sys/bus/pci/devices/*/modalias 2>/dev/null; then
+ | grep -qxf - /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias 2>/dev/null; then
hostonly='' instmods $_modname
continue
fi

View File

@ -0,0 +1,33 @@
From ed1f00d9fc14b0898448509f536295fb9c5ca013 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 22:04:38 +0200
Subject: [PATCH] Categorize needed modules on ARM
(cherry picked from commit b96ea1e196ae5706a68644a3679ee8c432b0b8f1)
(cherry picked from commit 9ac6dab566b853cd94afc096567ff16c03962f19)
---
modules.d/90kernel-modules/module-setup.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 1ce133f..f3e4f65 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -51,10 +51,13 @@ installkernel() {
if [[ "$(uname -p)" == arm* ]]; then
# arm specific modules
- hostonly='' instmods \
- connector-hdmi connector-dvi encoder-tfp410 \
- encoder-tpd12s015 i2c-tegra gpio-regulator \
- as3722-regulator orion-ehci ehci-tegra
+ instmods \
+ "=drivers/i2c/busses" \
+ "=drivers/regulator" \
+ "=drivers/rtc" \
+ "=drivers/usb/host" \
+ "=drivers/usb/phy" \
+ ${NULL}
fi
# install virtual machine support

View File

@ -0,0 +1,33 @@
From d0ab3c66afb624d90780d016e97102e48d113d23 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 22:04:39 +0200
Subject: [PATCH] Introduce ARM specific modules needed by drm
(cherry picked from commit 49fe860b22afd355b67f5f3f2ee30d5a3f0d3f5f)
(cherry picked from commit 62d553ed02907942ebfec93796eea952da83366e)
---
modules.d/50drm/module-setup.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index 9a48aaf..a42bcba 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -51,6 +51,17 @@ installkernel() {
return 0
}
+ if [[ "$(uname -p)" == arm* ]]; then
+ # arm specific modules needed by drm
+ instmods \
+ "=drivers/gpu/drm/i2c" \
+ "=drivers/gpu/drm/panel" \
+ "=drivers/pwm" \
+ "=drivers/video/backlight" \
+ "=drivers/video/fbdev/omap2/displays-new" \
+ ${NULL}
+ fi
+
for _modname in $(find_kernel_modules_by_path drivers/gpu/drm \
| drm_module_filter) ; do
# if the hardware is present, include module even if it is not currently loaded,

View File

@ -0,0 +1,173 @@
From 34eadc62cc8059f9a942f29c8d7e1575b4676f2f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 1 Aug 2014 13:16:29 +0200
Subject: [PATCH] fixed bridge setup
renamed "ethnames" in bridge.info to "bridgeslaves"
fixed ifcfg generation
(cherry picked from commit 2db6d7111870c5d16d812d9cddc23558f3f4a202)
(cherry picked from commit 536cd78d8cb2d9e4e5080131d9632d6105caec77)
---
modules.d/40network/ifup.sh | 4 ++--
modules.d/40network/net-genrules.sh | 2 +-
modules.d/40network/parse-bridge.sh | 18 ++++++++--------
modules.d/45ifcfg/write-ifcfg.sh | 42 +++++++++----------------------------
4 files changed, 22 insertions(+), 44 deletions(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 349530f..41ea631 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -60,7 +60,7 @@ fi
# bridge this interface?
if [ -e /tmp/bridge.info ]; then
. /tmp/bridge.info
- for ethname in $ethnames ; do
+ for ethname in $bridgeslaves ; do
if [ "$netif" = "$ethname" ]; then
if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
: # We need to really setup bond (recursive call)
@@ -236,7 +236,7 @@ if [ -e /tmp/bridge.info ]; then
if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
brctl addbr $bridgename
brctl setfd $bridgename 0
- for ethname in $ethnames ; do
+ for ethname in $bridgeslaves ; do
if [ "$ethname" = "$bondname" ] ; then
DO_BOND_SETUP=yes ifup $bondname -m
elif [ "$ethname" = "$teammaster" ] ; then
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index af2f09c..a43e3df 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -16,7 +16,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
# bridge: attempt only the defined interface
if [ -e /tmp/bridge.info ]; then
. /tmp/bridge.info
- IFACES="$IFACES ${ethnames%% *}"
+ IFACES="$IFACES ${bridgeslaves%% *}"
MASTER_IFACES="$MASTER_IFACES $bridgename"
fi
diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh
index 8c305c0..a910109 100755
--- a/modules.d/40network/parse-bridge.sh
+++ b/modules.d/40network/parse-bridge.sh
@@ -3,9 +3,9 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Format:
-# bridge=<bridgename>:<ethnames>
+# bridge=<bridgename>:<bridgeslaves>
#
-# <ethnames> is a comma-separated list of physical (ethernet) interfaces
+# <bridgeslaves> is a comma-separated list of physical (ethernet) interfaces
# bridge without parameters assumes bridge=br0:eth0
#
@@ -25,20 +25,20 @@ parsebridge() {
v=${v#*:}
done
- unset bridgename ethnames
+ unset bridgename bridgeslaves
case $# in
- 0) bridgename=br0; ethnames=$iface ;;
+ 0) bridgename=br0; bridgeslaves=$iface ;;
1) die "bridge= requires two parameters" ;;
- 2) bridgename=$1; ethnames=$(str_replace "$2" "," " ") ;;
+ 2) bridgename=$1; bridgeslaves=$(str_replace "$2" "," " ") ;;
*) die "bridge= requires two parameters" ;;
esac
}
-unset bridgename ethnames
+unset bridgename bridgeslaves
iface=eth0
-# Parse bridge for bridgename and ethnames
+# Parse bridge for bridgename and bridgeslaves
if bridge="$(getarg bridge)"; then
# Read bridge= parameters if they exist
if [ -n "$bridge" ]; then
@@ -47,9 +47,9 @@ if bridge="$(getarg bridge)"; then
# Simple default bridge
if [ -z "$bridgename" ]; then
bridgename=br0
- ethnames=$iface
+ bridgeslaves=$iface
fi
echo "bridgename=$bridgename" > /tmp/bridge.info
- echo "ethnames=\"$ethnames\"" >> /tmp/bridge.info
+ echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.info
return
fi
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index 7e301de..d920c22 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -214,6 +214,7 @@ for netup in /tmp/net.*.did-setup ; do
echo "SLAVE=yes"
echo "MASTER=\"$netif\""
echo "NAME=\"$slave\""
+ echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\""
} >> /tmp/ifcfg/ifcfg-$slave
done
fi
@@ -224,44 +225,21 @@ for netup in /tmp/net.*.did-setup ; do
echo "TYPE=Bridge"
echo "NAME=\"$netif\""
} >> /tmp/ifcfg/ifcfg-$netif
- if [ "$ethname" = "$bondname" ] ; then
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$bondname\""
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- # This variable is an indicator of a bond interface for initscripts
- echo "BONDING_OPTS=\"$bondoptions\""
- echo "BRIDGE=\"$netif\""
- echo "NAME=\"$bondname\""
- } >> /tmp/ifcfg/ifcfg-$bondname
- for slave in $bondslaves ; do
- # write separate ifcfg file for the raw eth interface
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$slave\""
- echo "TYPE=Ethernet"
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
- echo "SLAVE=yes"
- echo "MASTER=\"$bondname\""
- echo "NAME=\"$slave\""
- } >> /tmp/ifcfg/ifcfg-$slave
- done
- else
+ for slave in $bridgeslaves ; do
# write separate ifcfg file for the raw eth interface
{
echo "# Generated by dracut initrd"
- echo "DEVICE=\"$ethname\""
+ echo "DEVICE=\"$slave\""
echo "TYPE=Ethernet"
echo "ONBOOT=yes"
echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$ethname/address)\""
- echo "BRIDGE=\"$netif\""
- echo "NAME=\"$ethname\""
- } >> /tmp/ifcfg/ifcfg-$ethname
- fi
+ echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
+ echo "SLAVE=yes"
+ echo "MASTER=\"$bridgename\""
+ echo "NAME=\"$slave\""
+ echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\""
+ } >> /tmp/ifcfg/ifcfg-$slave
+ done
fi
i=1
for ns in $(getargs nameserver); do

View File

@ -0,0 +1,31 @@
From 75b42edffc013317e8fba4fc13a2044411df7a2c Mon Sep 17 00:00:00 2001
From: Alex Harpin <development@landsofshadow.co.uk>
Date: Sat, 2 Aug 2014 20:08:25 +0100
Subject: [PATCH] bridging: update the ifcfg files generated for bridge slaves
Update the ifcfg files generated for bridge slaves so they reference
the bridge they are part of. Related to early patch submitted as a
fix for Bug #1123552.
Bug #1123552 https://bugzilla.redhat.com/show_bug.cgi?id=1123552
(cherry picked from commit 32125a976bb6ff67768ca813446743b781ba012f)
(cherry picked from commit 209b04b3208dc448d63bee3255cccd30ea8f918e)
---
modules.d/45ifcfg/write-ifcfg.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index d920c22..7f068cb 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -234,8 +234,7 @@ for netup in /tmp/net.*.did-setup ; do
echo "ONBOOT=yes"
echo "NETBOOT=yes"
echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
- echo "SLAVE=yes"
- echo "MASTER=\"$bridgename\""
+ echo "BRIDGE=\"$bridgename\""
echo "NAME=\"$slave\""
echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\""
} >> /tmp/ifcfg/ifcfg-$slave

View File

@ -0,0 +1,28 @@
From 8ff6313ae8eb580ee6e10b0de7a42e4dccc1cc8b Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Aug 2014 12:56:53 +0200
Subject: [PATCH] i18n: check for $i18n_install_all == "yes" rather than being
set
i18n_install_all="no" does not have the expected effect without this
patch
(cherry picked from commit ae488efa5e6103ffc1be8b8782f8a1c7a5aa90b4)
(cherry picked from commit c0698905b29f311898d8a9ff4bb4f3dbd5eb2408)
---
modules.d/10i18n/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index a091f89..720fcbd 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -247,7 +247,7 @@ install() {
if checks; then
install_base
- if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} ]]; then
+ if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
install_local_i18n || install_all_kbd
else
install_all_kbd

View File

@ -0,0 +1,25 @@
From 8fb86c7c3095447dcb9dcb098d00479eafcaf62e Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 11:44:26 +0200
Subject: [PATCH] dracut.usage.asc: extend parameters for shutdown debug
procedure
(cherry picked from commit e02a29e7a2403dd1bb4f581b14ec4bf4ace6cba7)
(cherry picked from commit 6c6b91737f35d02f82cc08a72736c7a841ef213a)
---
dracut.usage.asc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.usage.asc b/dracut.usage.asc
index 6979af6..50ceb49 100644
--- a/dracut.usage.asc
+++ b/dracut.usage.asc
@@ -528,7 +528,7 @@ on _pre-shutdown_ or _shutdown_.
To do this from an already booted system:
----
# mkdir -p /run/initramfs/etc/cmdline.d
-# echo "rd.break=pre-shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
+# echo "rd.debug rd.break=pre-shutdown rd.break=shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
# touch /run/initramfs/.need_shutdown
----

View File

@ -0,0 +1,27 @@
From 9df52b82848042b7d7b29472b7065945bbc03b45 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 11:50:31 +0200
Subject: [PATCH] dracut.usage.asc: also add a link for RHEL-7 storage admin
guide
(cherry picked from commit 11b5db88c2d9290fc438b12a79a50bdd1d327203)
(cherry picked from commit 999249c60c8d762aac67e54b9b307b2b904896a1)
---
dracut.usage.asc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dracut.usage.asc b/dracut.usage.asc
index 50ceb49..6128ec4 100644
--- a/dracut.usage.asc
+++ b/dracut.usage.asc
@@ -259,7 +259,9 @@ local hard drive or it can be served by a PXE/TFTP server.
How to setup your PXE/TFTP server can be found in the
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red
-Hat Enterprise Linux Storage Administration Guide].
+Hat Enterprise Linux 6 Storage Administration Guide]
+or http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red
+Hat Enterprise Linux 7 Storage Administration Guide].
If you specify ip=auto on the kernel command line, then dracut asks a dhcp
server about the ip adress for the machine. The dhcp server can also serve an

View File

@ -0,0 +1,30 @@
From 7ad1f9e781a9729f7b27ba175466f1783c97482f Mon Sep 17 00:00:00 2001
From: WANG Chao <chaowang@redhat.com>
Date: Mon, 28 Jul 2014 22:26:28 +0800
Subject: [PATCH] dracut-functions: get_persistent_dev() fall back to the
original name
In case of raw disk/partition, ex. /dev/vda1, which doesn't contain any
filesystem on it. get_persistent_dev() would return empty. Now fix it to
return its original name, /dev/vda1 in above case. So that we don't have
to check its return string every time.
Signed-off-by: WANG Chao <chaowang@redhat.com>
(cherry picked from commit a628b7caf52459a31c46463744fafc42bb8f3407)
(cherry picked from commit a2ff6aafa19b8a6bcdaa8a26e97ea1ba17bcbab9)
---
dracut-functions.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 6cdfea0..b07063f 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -388,6 +388,7 @@ get_persistent_dev() {
return
fi
done
+ echo $1
}
expand_persistent_dev() {

View File

@ -0,0 +1,25 @@
From 3f1d55be20cfcdd4cad61dac4cb89f57381237e6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 12:36:04 +0200
Subject: [PATCH] dracut-functions.sh:get_persistent_dev(): use printf, instead
of echo
(cherry picked from commit 9efb74a32d34533f7ccb201160ea0e40adc13987)
(cherry picked from commit 1c4b50e8ced8fc851704f5666b33994c0f61b77a)
---
dracut-functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index b07063f..9286828 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -388,7 +388,7 @@ get_persistent_dev() {
return
fi
done
- echo $1
+ printf -- "%s" "$1"
}
expand_persistent_dev() {

View File

@ -0,0 +1,43 @@
From 69d3cf385c57710d395b61c1d912cf2a204faae6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 20 Aug 2014 10:21:43 +0200
Subject: [PATCH] dracut.sh: source dracut-version.sh earlier than
dracut-functions.sh
Otherwise dracut-logger.sh outputs an empty version on journal testing.
Aug 20 10:15:49 lenovo dracut[11144]: dracut-
Aug 20 10:15:49 lenovo dracut[11148]: Executing: /sbin/dracut
(cherry picked from commit e27ecc9ae8352c98c206ea5165ab6b85d3d6cd3a)
(cherry picked from commit 8c1736e9b52953f633bb778297ca7db0d49bbf31)
---
dracut.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 1844336..d17d1d1 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -857,6 +857,10 @@ if [[ $print_cmdline ]]; then
kmsgloglvl=0
fi
+if [[ -f $dracutbasedir/dracut-version.sh ]]; then
+ . $dracutbasedir/dracut-version.sh
+fi
+
if [[ -f $dracutbasedir/dracut-functions.sh ]]; then
. $dracutbasedir/dracut-functions.sh
else
@@ -875,10 +879,6 @@ if ! [[ $print_cmdline ]]; then
rm -fr -- ${initdir}/*
fi
-if [[ -f $dracutbasedir/dracut-version.sh ]]; then
- . $dracutbasedir/dracut-version.sh
-fi
-
# Verify bash version, current minimum is 3.1
if (( BASH_VERSINFO[0] < 4 )); then
dfatal 'You need at least Bash 4 to use dracut, sorry.'

View File

@ -0,0 +1,24 @@
From ea0a71658acd551fbed36cdd35bb543d7493a58a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 21 Aug 2014 16:38:35 +0200
Subject: [PATCH] dracut-lib.sh:cancel_wait_for_dev() fixed double escape
(cherry picked from commit 7c752ffaef3426a4ddd2b86abbc02053aaf8c356)
(cherry picked from commit 7c12e7501feb99838df2167c5d9da2e1b2c24905)
---
modules.d/99base/dracut-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index abcebf5..7d97c7a 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -930,7 +930,7 @@ wait_for_dev()
cancel_wait_for_dev()
{
local _name
- _name="$(str_replace "$1" '/' '\\x2f')"
+ _name="$(str_replace "$1" '/' '\x2f')"
rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh"
rm -f -- "$hookdir/emergency/80-${_name}.sh"
if [ -n "$DRACUT_SYSTEMD" ]; then

View File

@ -0,0 +1,56 @@
From 7a27ce82a0199a9205471d380d48467adfdea731 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 24 Jul 2014 14:47:14 +0200
Subject: [PATCH] dracut.spec: fixed license file packaging
(cherry picked from commit caa72f829007a868bf47a9bb82a3e359acd6a420)
(cherry picked from commit 1ddd3fd89a4dea2a247dc824ad4da09d2493a74d)
---
dracut.spec | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index cb27f37..8912938 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -30,6 +30,8 @@ URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
+Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
+
BuildRequires: bash git
@@ -194,6 +196,7 @@ This package contains tools to assemble the local initrd and host configuration.
%prep
%setup -q -n %{name}-%{version}
+cp %{SOURCE1} .
%if %{defined PATCH1}
git init
@@ -293,8 +296,10 @@ rm -rf -- $RPM_BUILD_ROOT
%files
%defattr(-,root,root,0755)
%if %{with doc}
-%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
+%doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
%endif
+%{!?_licensedir:%global license %%doc}
+%license COPYING lgpl-2.1.txt
%{_bindir}/dracut
# compat symlink
%{_sbindir}/dracut
@@ -441,11 +446,6 @@ rm -rf -- $RPM_BUILD_ROOT
%files fips-aesni
%defattr(-,root,root,0755)
-
-%if %{with doc}
-%doc COPYING
-%endif
-
%{dracutlibdir}/modules.d/02fips-aesni
%files caps

View File

@ -0,0 +1,26 @@
From b21832a016ae359994a106c4697c80daa6bc74c9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 14:03:39 +0200
Subject: [PATCH] Makefile:rpm: wget the lgpl license for Source1
(cherry picked from commit 99128f2b64775313866b1d4edd3cd6220be937f8)
(cherry picked from commit 6d2b9b40d6abfb022a8af6787154b834b9d969da)
---
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 7383309..f68960a 100644
--- a/Makefile
+++ b/Makefile
@@ -188,7 +188,9 @@ rpm: dracut-$(VERSION).tar.xz syncheck
rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
cp dracut-$(VERSION).tar.xz "$$rpmbuild"; \
LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \
- (cd "$$rpmbuild"; rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
+ (cd "$$rpmbuild"; \
+ wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
+ rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
--define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
( mv "$$rpmbuild"/$$(arch)/*.rpm .; mv "$$rpmbuild"/*.src.rpm .;rm -fr -- "$$rpmbuild"; ls *.rpm )

View File

@ -0,0 +1,38 @@
From 523a2bded25396069c113f3d61fa159eb1b63855 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 25 Nov 2014 13:44:54 +0100
Subject: [PATCH] dmsquash-live: do not abort, if user pressed ESC on
checkisomd5
If the user pressed ESC while checkisomd5 runs the media check, it will
exit with "2". Previously that would mean, that the media check was not
successful.
(cherry picked from commit 370035d561baa6852bcb02161ef736a78b62b336)
---
modules.d/90dmsquash-live/checkisomd5@.service | 1 +
modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules.d/90dmsquash-live/checkisomd5@.service b/modules.d/90dmsquash-live/checkisomd5@.service
index 20e40bd..c4ca10f 100644
--- a/modules.d/90dmsquash-live/checkisomd5@.service
+++ b/modules.d/90dmsquash-live/checkisomd5@.service
@@ -11,3 +11,4 @@ StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
TimeoutSec=0
+SuccessExitStatus=2
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
index 5705e8d..a6f5af3 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
@@ -41,7 +41,7 @@ if [ -n "$check" ]; then
else
checkisomd5 --verbose $livedev
fi
- if [ $? -ne 0 ]; then
+ if [ $? -eq 1 ]; then
die "CD check failed!"
exit 1
fi

View File

@ -0,0 +1,28 @@
From 2fb35a812fd668257b6d5ac38be48df7184a5aaf Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 4 Dec 2014 11:54:47 +0100
Subject: [PATCH] dracut.conf.d/fedora.conf.example: turn on early_microcode
(cherry picked from commit 414dc51ca2b60a15405bb2b0b1ac23d4d1ef905c)
---
dracut.conf.d/fedora.conf.example | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example
index c06202b..f248f51 100644
--- a/dracut.conf.d/fedora.conf.example
+++ b/dracut.conf.d/fedora.conf.example
@@ -4,6 +4,8 @@
i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP"
i18n_default_font="latarcyrheb-sun16"
i18n_install_all="yes"
+
+
stdloglvl=3
sysloglvl=5
install_optional_items+=" vi /etc/virc ps grep cat rm "
@@ -13,3 +15,4 @@ systemdsystemunitdir=/usr/lib/systemd/system
systemdsystemconfdir=/etc/systemd/system
udevdir=/usr/lib/udev
hostonly="yes"
+early_microcode="yes"

View File

@ -0,0 +1,30 @@
From 0fe116e7fd4762bf654d9a804883f391adb36179 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 6 Nov 2014 10:44:33 +0100
Subject: [PATCH] systemd: add 90-vconsole.rules
run systemd-vconsole-setup if fbcon device shows up
(cherry picked from commit 027565d0233f76edf434b63a847a717185d267e2)
---
modules.d/98systemd/module-setup.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
index d56d21a..6b2017e 100755
--- a/modules.d/98systemd/module-setup.sh
+++ b/modules.d/98systemd/module-setup.sh
@@ -200,7 +200,12 @@ install() {
inst_binary true
ln_r $(type -P true) "/usr/bin/loginctl"
ln_r $(type -P true) "/bin/loginctl"
- inst_rules 70-uaccess.rules 71-seat.rules 73-seat-late.rules 99-systemd.rules
+ inst_rules \
+ 70-uaccess.rules \
+ 71-seat.rules \
+ 73-seat-late.rules \
+ 90-vconsole.rules \
+ 99-systemd.rules
for i in \
emergency.target \

View File

@ -0,0 +1,81 @@
From 00529cd63e2c82660208bdd07f9ce4db206d560c Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 1 Dec 2014 12:36:20 +0100
Subject: [PATCH] do not symlink /var/log to /run/log
some programs e.g. systemd-journald expect a directory in /var/log as
the marker to do some actions. Here journald tries to flush
/run/log/journal to /var/log/journal, if the directory is seen.
/var/log is now a symlink to /run/initramfs/log.
(cherry picked from commit 99d4fd6bb791ca8ce07e07e13b58445f3e20894a)
---
dracut.sh | 1 -
modules.d/98systemd/dracut-tmpfiles.conf | 3 +++
modules.d/98systemd/module-setup.sh | 5 +++++
modules.d/99base/dracut-lib.sh | 6 +++++-
4 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 modules.d/98systemd/dracut-tmpfiles.conf
diff --git a/dracut.sh b/dracut.sh
index d17d1d1..1eeeb30 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1231,7 +1231,6 @@ if [[ $kernel_only != yes ]]; then
ln -sfn ../run "$initdir/var/run"
ln -sfn ../run/lock "$initdir/var/lock"
- ln -sfn ../run/log "$initdir/var/log"
else
for d in lib "$libdir"; do
[[ -e "${initdir}${prefix}/$d" ]] && continue
diff --git a/modules.d/98systemd/dracut-tmpfiles.conf b/modules.d/98systemd/dracut-tmpfiles.conf
new file mode 100644
index 0000000..3c21ce8
--- /dev/null
+++ b/modules.d/98systemd/dracut-tmpfiles.conf
@@ -0,0 +1,3 @@
+d /run/initramfs 0755 root root -
+d /run/initramfs/log 0755 root root -
+L /var/log - - - - ../run/initramfs/log
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
index 6b2017e..ce7106d 100755
--- a/modules.d/98systemd/module-setup.sh
+++ b/modules.d/98systemd/module-setup.sh
@@ -125,6 +125,8 @@ install() {
$systemdsystemunitdir/slices.target \
$systemdsystemunitdir/system.slice \
\
+ $tmpfilesdir/systemd.conf \
+ \
journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles
inst_multiple -o \
@@ -234,6 +236,9 @@ install() {
ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}"
done
+ inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf"
+
+
mkdir -p "$initdir/etc/systemd"
# turn off RateLimit for journal
{
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index 7d97c7a..a299e41 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -8,7 +8,11 @@ if [ -n "$NEWROOT" ]; then
[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
fi
-[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
+if ! [ -d /run/initramfs ]; then
+ mkdir -p -m 0755 /run/initramfs/log
+ ln -sfn /run/initramfs/log /var/log
+fi
+
[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
[ -d /run/log ] || mkdir -p -m 0755 /run/log

View File

@ -0,0 +1,38 @@
From 08b0280c8a3f057c44bb0e761d4e0755f8c299f8 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 17 Dec 2014 12:08:37 +0100
Subject: [PATCH] resume: make use of systemd-hibernate-resume, if existant
Source: https://bugzilla.redhat.com/attachment.cgi?id=990261&action=diff
References: https://bugzilla.redhat.com/show_bug.cgi?id=1174945
Based on dracut commit 733c71c:
http://git.kernel.org/cgit/boot/dracut/dracut.git/patch/?id=733c71ce9e2d161c9e04772aeb1c5fb38e3fcb3a
Note: e-mail header was used from original commit
modules.d/95resume/module-setup.sh | 9 +++++++++
1 file changed, 9 insertions(+)
---
modules.d/95resume/module-setup.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
index b964b3e..28e981c 100755
--- a/modules.d/95resume/module-setup.sh
+++ b/modules.d/95resume/module-setup.sh
@@ -35,6 +35,15 @@ install() {
echo >> "${initdir}/etc/cmdline.d/95resume.conf"
fi
+ # if systemd is included and has the hibernate-resume tool, use it and nothing else
+ if dracut_module_included "systemd" && [[ -x $systemdutildir/systemd-hibernate-resume ]]; then
+ inst_multiple -o \
+ $systemdutildir/system-generators/systemd-hibernate-resume-generator \
+ $systemdsystemunitdir/systemd-hibernate-resume@.service \
+ $systemdutildir/systemd-hibernate-resume
+ return 0
+ fi
+
# Optional uswsusp support
for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib/uswsusp/resume
do

View File

@ -0,0 +1,25 @@
From fe7e3007d221e2795f0620363d7fa2a5e0307d93 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 8 Sep 2014 13:25:53 +0200
Subject: [PATCH] kernel-modules: added hid-lcpower
(cherry picked from commit 23ad117c4951c040761e754adb605e98c034dfe7)
https://bugzilla.redhat.com/show_bug.cgi?id=1135734
---
modules.d/90kernel-modules/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index f3e4f65..5f96ba9 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -45,7 +45,7 @@ installkernel() {
instmods yenta_socket scsi_dh_rdac scsi_dh_emc \
atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \
- hid-logitech-dj hid-microsoft firewire-ohci \
+ hid-logitech-dj hid-microsoft hid-lcpower firewire-ohci \
pcmcia usb_storage nvme hid-hyperv hv-vmbus \
sdhci_acpi

View File

@ -0,0 +1,42 @@
From c7853418f7bb095e2cef000e261a5a2293d15a81 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 28 Jan 2015 13:25:09 +0000
Subject: [PATCH] lvm: add cache tools for dm-cache usage
(cherry picked from commit 70598ac292bce6e554cf0dc327426a7dbf92c65f)
https://bugzilla.redhat.com/show_bug.cgi?id=1184519
---
modules.d/90lvm/module-setup.sh | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index 2f2b64c..6731c65 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -109,12 +109,19 @@ install() {
dev=$(</sys/block/${dev#/dev/}/dm/name)
eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null)
[[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue
- if [[ "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" == *thin* ]] ; then
- inst_multiple -o thin_dump thin_restore thin_check thin_repair
- break
- fi
+ case "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" in
+ *thin*|*cache*|*era*)
+ inst_multiple -o thin_dump thin_restore thin_check thin_repair \
+ cache_dump cache_restore cache_check cache_repair \
+ era_check era_dump era_invalidate era_restore
+ break;;
+ esac
done
- else
- inst_multiple -o thin_dump thin_restore thin_check thin_repair
+ fi
+
+ if ! [[ $hostonly ]]; then
+ inst_multiple -o thin_dump thin_restore thin_check thin_repair \
+ cache_dump cache_restore cache_check cache_repair \
+ era_check era_dump era_invalidate era_restore
fi
}

View File

@ -0,0 +1,41 @@
From f95f348d8975f7e37465226d1fee9791f68e7c92 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 23 Apr 2015 13:46:52 +0200
Subject: [PATCH] kernel-modules: install all HID drivers
Instead of hardcoding a list of useful drivers, which has to be curated
all the time, just include all HID drivers.
(cherry picked from commit 180e9d78516fb4b2ee5baef44521007a860d4dd2)
https://bugzilla.redhat.com/show_bug.cgi?id=1204392
---
modules.d/90kernel-modules/module-setup.sh | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 5f96ba9..062aca4 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -41,13 +41,15 @@ installkernel() {
ehci-hcd ehci-pci ehci-platform \
ohci-hcd ohci-pci \
uhci-hcd \
- xhci-hcd
+ xhci-hcd xhci-pci xhci-plat-hcd
- instmods yenta_socket scsi_dh_rdac scsi_dh_emc \
- atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \
- hid-logitech-dj hid-microsoft hid-lcpower firewire-ohci \
- pcmcia usb_storage nvme hid-hyperv hv-vmbus \
- sdhci_acpi
+ instmods \
+ "=drivers/hid" \
+ "=drivers/input/serio" \
+ "=drivers/input/keyboard"
+
+ instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
+ atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus
if [[ "$(uname -p)" == arm* ]]; then
# arm specific modules

View File

@ -0,0 +1,53 @@
From 2c98646d6737b931cff0aec53156b6959a401549 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 23 Apr 2015 16:11:53 +0200
Subject: [PATCH] drm/module-setup.sh: radeon needs amdkfd
AMD's HSA Linux kernel driver (amdkfd) has been merged into the mainline
kernel since kernel 3.19.
However, for the driver to work, it needs to be included in the default
initramfs image, together with the amd_iommu_v2 driver.
The radeon driver (AMD's kernel graphic driver) calls amdkfd during its
initialization and probing stages. Because radeon is included in the
initramfs image, it tries to initialize amdkfd during the early boot
stages. However, as amdkfd is not present there, it fails.
That doesn't harm radeon operation. However, it disables the HSA
abilities in the machine.
Because of the current design, if you later try to "modprobe amdkfd",
you won't be able to run HSA applications, even though the driver will
be loaded.
https://bugzilla.redhat.com/show_bug.cgi?id=1205222
(cherry picked from commit a3e464ca43618e362ad3c2e20573de23d725bee6)
---
modules.d/50drm/module-setup.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index a42bcba..317c084 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -62,6 +62,8 @@ installkernel() {
${NULL}
fi
+ instmods amdkfd
+
for _modname in $(find_kernel_modules_by_path drivers/gpu/drm \
| drm_module_filter) ; do
# if the hardware is present, include module even if it is not currently loaded,
@@ -70,6 +72,10 @@ installkernel() {
if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \
| grep -qxf - /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias 2>/dev/null; then
hostonly='' instmods $_modname
+ # if radeon.ko is installed, we want amdkfd also
+ if strstr "$_modname" radeon.ko; then
+ hostonly='' instmods amdkfd
+ fi
continue
fi
instmods $_modname

View File

@ -0,0 +1,24 @@
From c1d1a985b980ef1d89d39dce1c3570f3adf119ad Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 18 May 2015 13:43:26 +0200
Subject: [PATCH] 50drm: add hyperv_fb kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=1192035
(cherry picked from commit 81b67232dcc796178124676d124d7d91514e4a8f)
---
modules.d/50drm/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index 317c084..fd484e3 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -62,7 +62,7 @@ installkernel() {
${NULL}
fi
- instmods amdkfd
+ instmods amdkfd hyperv_fb
for _modname in $(find_kernel_modules_by_path drivers/gpu/drm \
| drm_module_filter) ; do

View File

@ -0,0 +1,33 @@
From bf46a9105123ac9b36af1debb225bb8007d427c9 Mon Sep 17 00:00:00 2001
From: Daniel Drake <drake@endlessm.com>
Date: Thu, 15 Jan 2015 11:27:47 -0600
Subject: [PATCH] kernel-modules: increase SDHCI driver inclusion
The sdhci-pci module is currently not being included in the initramfs,
even though other sdhci modules are. This breaks boot on systems that
rely on this driver to access the root filesystem.
Instead of looking for modules that use sdhci_pltfm_init, look for
sdhci_add_host. I checked 3.18 kernel sources, and this change
does not remove any of the previously-matched SDHCI drivers.
It should result in the addition of sdhci-pci, sdhci-s3c, sdhci-spear
and sdhci-acpi.
(cherry picked from commit 6dcc5e1158bf502b431491a381a16ca894f99ae2)
---
modules.d/90kernel-modules/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 062aca4..9213cd4 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -6,7 +6,7 @@
installkernel() {
if [[ -z $drivers ]]; then
block_module_filter() {
- local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_pltfm_init'
+ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host'
# subfunctions inherit following FDs
local _merge=8 _side2=9
function bmf1() {

View File

@ -0,0 +1,43 @@
From 646abedf85c35874cbac4afb9d27a72651dc31da Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Tue, 23 Dec 2014 22:03:10 +0100
Subject: [PATCH] dracut-functions.sh: avoid tokenizing ldconfig output with
'read'
The space does not separate the elements reliably, spaces can be
embedded in parenthesized expressions too:
libgmpxx.so.4 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmpxx.so.4
libgmp.so.10 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmp.so.10
This results in dracut creating '0x0000000004000000' and '=>'
directories in the initramfs image.
(cherry picked from commit c59779cf9337bc0fc48c7a4d8437f7253f6822c3)
---
dracut-functions.sh | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 9286828..e2e2900 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -106,17 +106,7 @@ fi
ldconfig_paths()
{
- local a i
- declare -A a
- for i in $(
- ldconfig -pN 2>/dev/null | grep -F '=>' | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | while read a b c d; do
- d=${d%/*}
- printf "%s\n" "$d";
- done
- ); do
- a["$i"]=1;
- done;
- printf "%s\n" ${!a[@]}
+ ldconfig -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
}
# Detect lib paths

View File

@ -11,7 +11,7 @@
Name: dracut
Version: 038
Release: 1%{?dist}
Release: 40.git20150819%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -30,6 +30,47 @@ URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
Patch1: 0001-modsign-do-not-hardcode-path-to-keyctl.patch
Patch2: 0002-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch
Patch3: 0003-dracut.sh-always-copy-prelink-files-in-FIPS-mode.patch
Patch4: 0004-plymouth-also-find-the-pkglibdir-on-debian.patch
Patch5: 0005-dracut-functions.sh-speed-up-ldconfig_paths.patch
Patch6: 0006-Installing-an-OS-with-VLAN-enabled-to-an-ISCSI-LUN-f.patch
Patch7: 0007-dracut-functions.sh-fix-inst-functions-for-H-handlin.patch
Patch8: 0008-ARM-update-modules-for-ARM-host-only-options.patch
Patch9: 0009-base-dracut-lib-pidof-turn-off-debugging.patch
Patch10: 0010-network-add-rd.route-parameter.patch
Patch11: 0011-add-install-optional-and-install_optional_items.patch
Patch12: 0012-test-TEST-30-ISCSI-add-rd.shell-to-client-root.patch
Patch13: 0013-dracut.sh-add-DRACUT_PATH.patch
Patch14: 0014-Test-soc-path-for-modalias-needed-by-drm.patch
Patch15: 0015-Categorize-needed-modules-on-ARM.patch
Patch16: 0016-Introduce-ARM-specific-modules-needed-by-drm.patch
Patch17: 0017-fixed-bridge-setup.patch
Patch18: 0018-bridging-update-the-ifcfg-files-generated-for-bridge.patch
Patch19: 0019-i18n-check-for-i18n_install_all-yes-rather-than-bein.patch
Patch20: 0020-dracut.usage.asc-extend-parameters-for-shutdown-debu.patch
Patch21: 0021-dracut.usage.asc-also-add-a-link-for-RHEL-7-storage-.patch
Patch22: 0022-dracut-functions-get_persistent_dev-fall-back-to-the.patch
Patch23: 0023-dracut-functions.sh-get_persistent_dev-use-printf-in.patch
Patch24: 0024-dracut.sh-source-dracut-version.sh-earlier-than-drac.patch
Patch25: 0025-dracut-lib.sh-cancel_wait_for_dev-fixed-double-escap.patch
Patch26: 0026-dracut.spec-fixed-license-file-packaging.patch
Patch27: 0027-Makefile-rpm-wget-the-lgpl-license-for-Source1.patch
Patch28: 0028-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch
Patch29: 0029-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch
Patch30: 0030-systemd-add-90-vconsole.rules.patch
Patch31: 0031-do-not-symlink-var-log-to-run-log.patch
Patch32: 0032-resume-make-use-of-systemd-hibernate-resume-if-exist.patch
Patch33: 0033-kernel-modules-added-hid-lcpower.patch
Patch34: 0034-lvm-add-cache-tools-for-dm-cache-usage.patch
Patch35: 0035-kernel-modules-install-all-HID-drivers.patch
Patch36: 0036-drm-module-setup.sh-radeon-needs-amdkfd.patch
Patch37: 0037-50drm-add-hyperv_fb-kernel-module.patch
Patch38: 0038-kernel-modules-increase-SDHCI-driver-inclusion.patch
Patch39: 0039-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
BuildRequires: bash git
@ -195,6 +236,7 @@ This package contains tools to assemble the local initrd and host configuration.
%prep
%setup -q -n %{name}-%{version}
cp %{SOURCE1} .
%if %{defined PATCH1}
git init
@ -294,8 +336,10 @@ rm -rf -- $RPM_BUILD_ROOT
%files
%defattr(-,root,root,0755)
%if %{with doc}
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
%doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
%endif
%{!?_licensedir:%global license %%doc}
%license COPYING lgpl-2.1.txt
%{_bindir}/dracut
# compat symlink
%{_sbindir}/dracut
@ -442,11 +486,6 @@ rm -rf -- $RPM_BUILD_ROOT
%files fips-aesni
%defattr(-,root,root,0755)
%if %{with doc}
%doc COPYING
%endif
%{dracutlibdir}/modules.d/02fips-aesni
%files caps
@ -478,6 +517,61 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%changelog
* Wed Aug 19 2015 Harald Hoyer <harald@redhat.com> 038-40.git20150819
- fix ldconfig paths
Resolves: rhbz#1253889
* Mon May 18 2015 Harald Hoyer <harald@redhat.com> 038-39.git20150518
- add more input drivers
Resolves: rhbz#1135734 rhbz#1204392
- lvm: add cache tools for dm-cache usage
Resolves: rhbz#1184519
- add hyperv framebuffer module
Resolves: rhbz#1192035
- add amdkfd kernel module
Resolves: rhbz#1205222
- add sdhci-pci kernel module
Resolves: rhbz#1211480
* Fri Mar 06 2015 Till Maas <opensource@till.name> - 038-33.git20141216
- Do not fsck on resum from hibernate
Resolves: rhbz#1174945
* Tue Dec 16 2014 Harald Hoyer <harald@redhat.com> 038-32.git20141216
- fixed systemd journal in the initramfs
Resolves: rhbz#1174733
* Thu Dec 04 2014 Harald Hoyer <harald@redhat.com> 038-30.git20141204
- add 90-vconsole.rules
Resolves: rhbz#1150384
* Tue Sep 30 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 038-30.git20140903
- Allow media check to be cancelled (rhbz 1147941)
* Thu Sep 25 2014 Josh Boyer <jwboyer@fedoraproject.org> 038-29.git20140903
- Enable early-microcode by default (rhbz 1083716)
* Wed Sep 03 2014 Harald Hoyer <harald@redhat.com> 038-28.git20140903
- more ARM modules
- fixed ifcfg for bridges
- fallback for persistent device names
- fixed cancel_wait_for_dev()
- more documentation
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 038-15.git20140724
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Thu Jul 24 2014 Harald Hoyer <harald@redhat.com> 038-14.git20140724
- fixed lvm modules issues
Resolves: rhbz#1118890
- fixed vlan issues
- fixed prelink for FIPS
- new rd.route parameter
- more ARM modules
* Fri Jul 11 2014 Tom Callaway <spot@fedoraproject.org> - 038-2
- fix license handling
* Mon Jun 30 2014 Harald Hoyer <harald@redhat.com> 038-1
- version 038

502
lgpl-2.1.txt Normal file
View File

@ -0,0 +1,502 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!