dracut-019-62.git20120621
- do not require pkg-config for systemd - i18n fixes - less systemd services in the initramfs
This commit is contained in:
parent
e3ef5716a9
commit
5414ff20d6
@ -0,0 +1,54 @@
|
||||
From a20d24ded292bfcf96f4fdab78ec20b92a07bbf1 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 21 Jun 2012 01:57:11 +0200
|
||||
Subject: [PATCH] dracut-functions.sh: use "ln -r" instead of shell functions
|
||||
|
||||
---
|
||||
dracut-functions.sh | 20 ++++++++++++++++----
|
||||
1 file changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 1137919..d4a766b 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -188,6 +188,19 @@ convert_abs_rel() {
|
||||
echo "$__newpath"
|
||||
}
|
||||
|
||||
+if strstr "$(ln --help)" "relative"; then
|
||||
+ ln_r() {
|
||||
+ ln -sfnr "${initdir}/$1" "${initdir}/$2"
|
||||
+ }
|
||||
+else
|
||||
+ ln_r() {
|
||||
+ local _source=$1
|
||||
+ local _dest=$2
|
||||
+ [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/}
|
||||
+ ln -sfn $(convert_abs_rel "${_dest}" "${_source}") "${initdir}/${_dest}"
|
||||
+ }
|
||||
+fi
|
||||
+
|
||||
# get_fs_env <device>
|
||||
# Get and set the ID_FS_TYPE and ID_FS_UUID variable from udev for a device.
|
||||
# Example:
|
||||
@@ -465,8 +478,7 @@ inst_library() {
|
||||
_reallib=$(readlink -f "$_src")
|
||||
inst_simple "$_reallib" "$_reallib"
|
||||
inst_dir "${_dest%/*}"
|
||||
- [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/}
|
||||
- ln -sfn $(convert_abs_rel "${_dest}" "${_reallib}") "${initdir}/${_dest}"
|
||||
+ ln_r "${_reallib}" "${_dest}"
|
||||
else
|
||||
inst_simple "$_src" "$_dest"
|
||||
fi
|
||||
@@ -555,8 +567,8 @@ inst_symlink() {
|
||||
fi
|
||||
fi
|
||||
[[ ! -e $initdir/${_target%/*} ]] && inst_dir "${_target%/*}"
|
||||
- [[ -d ${_target%/*} ]] && _target=$(readlink -f ${_target%/*})/${_target##*/}
|
||||
- ln -sfn $(convert_abs_rel "${_target}" "${_realsrc}") "$initdir/$_target"
|
||||
+
|
||||
+ ln_r "${_realsrc}" "${_target}"
|
||||
}
|
||||
|
||||
# attempt to install any programs specified in a udev rule
|
74
0058-systemd-remove-unneeded-systemd-services.patch
Normal file
74
0058-systemd-remove-unneeded-systemd-services.patch
Normal file
@ -0,0 +1,74 @@
|
||||
From 579ca216b426923ea312ebd46582e38a683b5531 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 21 Jun 2012 03:36:58 +0200
|
||||
Subject: [PATCH] systemd: remove unneeded systemd services
|
||||
|
||||
---
|
||||
modules.d/98systemd/module-setup.sh | 17 -----------------
|
||||
1 file changed, 17 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
|
||||
index adef939..d11aa8a 100755
|
||||
--- a/modules.d/98systemd/module-setup.sh
|
||||
+++ b/modules.d/98systemd/module-setup.sh
|
||||
@@ -21,15 +21,10 @@ install() {
|
||||
$systemdutildir/systemd-cgroups-agent \
|
||||
$systemdutildir/systemd-initctl \
|
||||
$systemdutildir/systemd-shutdown \
|
||||
- $systemdutildir/systemd-modules-load \
|
||||
- $systemdutildir/systemd-remount-fs \
|
||||
$systemdutildir/systemd-reply-password \
|
||||
$systemdutildir/systemd-fsck \
|
||||
- $systemdutildir/systemd-sysctl \
|
||||
$systemdutildir/systemd-udevd \
|
||||
$systemdutildir/systemd-journald \
|
||||
- $systemdutildir/systemd-vconsole-setup \
|
||||
- $systemdutildir/systemd-cryptsetup \
|
||||
$systemdsystemunitdir/emergency.target \
|
||||
$systemdsystemunitdir/sysinit.target \
|
||||
$systemdsystemunitdir/basic.target \
|
||||
@@ -53,19 +48,13 @@ install() {
|
||||
$systemdsystemunitdir/swap.target \
|
||||
$systemdsystemunitdir/systemd-initctl.socket \
|
||||
$systemdsystemunitdir/systemd-shutdownd.socket \
|
||||
- $systemdsystemunitdir/bluetooth.target \
|
||||
$systemdsystemunitdir/systemd-ask-password-console.path \
|
||||
$systemdsystemunitdir/systemd-udev-control.socket \
|
||||
$systemdsystemunitdir/systemd-udev-kernel.socket \
|
||||
$systemdsystemunitdir/systemd-ask-password-plymouth.path \
|
||||
$systemdsystemunitdir/systemd-journald.socket \
|
||||
- $systemdsystemunitdir/cryptsetup.target \
|
||||
- $systemdsystemunitdir/console-shell.service \
|
||||
- $systemdsystemunitdir/console-getty.service \
|
||||
$systemdsystemunitdir/systemd-initctl.service \
|
||||
$systemdsystemunitdir/systemd-shutdownd.service \
|
||||
- $systemdsystemunitdir/systemd-modules-load.service \
|
||||
- $systemdsystemunitdir/systemd-remount-fs.service \
|
||||
$systemdsystemunitdir/systemd-ask-password-console.service \
|
||||
$systemdsystemunitdir/halt.service \
|
||||
$systemdsystemunitdir/poweroff.service \
|
||||
@@ -78,12 +67,9 @@ install() {
|
||||
$systemdsystemunitdir/systemd-ask-password-plymouth.service \
|
||||
$systemdsystemunitdir/systemd-journald.service \
|
||||
$systemdsystemunitdir/systemd-vconsole-setup.service \
|
||||
- $systemdsystemunitdir/systemd-localed.service \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-ask-password-console.path \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-journald.service \
|
||||
- $systemdsystemunitdir/sysinit.target.wants/systemd-vconsole-setup.service \
|
||||
- $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
|
||||
$systemdsystemunitdir/sockets.target.wants/systemd-initctl.socket \
|
||||
$systemdsystemunitdir/sockets.target.wants/systemd-shutdownd.socket \
|
||||
$systemdsystemunitdir/sockets.target.wants/systemd-udev-control.socket \
|
||||
@@ -91,11 +77,8 @@ install() {
|
||||
$systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-udev.service \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \
|
||||
- $systemdsystemunitdir/local-fs.target.wants/systemd-remount-fs.service \
|
||||
- $systemdsystemunitdir/local-fs.target.wants/fsck-root.service \
|
||||
$systemdsystemunitdir/local-fs.target.wants/tmp.mount \
|
||||
$systemdsystemunitdir/ctrl-alt-del.target \
|
||||
- $systemdsystemunitdir/autovt@.service \
|
||||
$systemdsystemunitdir/single.service \
|
||||
$systemdsystemunitdir/syslog.socket \
|
||||
$systemdsystemunitdir/syslog.target \
|
@ -0,0 +1,79 @@
|
||||
From ee876e03b9c88bed7fb3d2a337b2361e07bbb0e3 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 21 Jun 2012 09:24:44 +0200
|
||||
Subject: [PATCH] fixed i18n for systemd and include more config files in
|
||||
host-only
|
||||
|
||||
---
|
||||
modules.d/10i18n/console_init.sh | 2 ++
|
||||
modules.d/98systemd/module-setup.sh | 17 ++++++++++++++---
|
||||
2 files changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/10i18n/console_init.sh b/modules.d/10i18n/console_init.sh
|
||||
index b46046b..37efdd1 100755
|
||||
--- a/modules.d/10i18n/console_init.sh
|
||||
+++ b/modules.d/10i18n/console_init.sh
|
||||
@@ -2,6 +2,8 @@
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
+[ -x /lib/systemd/systemd-vconsole-setup ] && exit 0
|
||||
+
|
||||
[ -e /etc/vconsole.conf ] && . /etc/vconsole.conf
|
||||
|
||||
DEFAULT_FONT=LatArCyrHeb-16
|
||||
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
|
||||
index d11aa8a..4c68a9a 100755
|
||||
--- a/modules.d/98systemd/module-setup.sh
|
||||
+++ b/modules.d/98systemd/module-setup.sh
|
||||
@@ -7,7 +7,8 @@ check() {
|
||||
if [[ -x /lib/systemd/systemd ]] || [[ -x /usr/lib/systemd/systemd ]]; then
|
||||
return 255
|
||||
fi
|
||||
- pkg-config systemd --variable=systemdutildir >/dev/null && return 255
|
||||
+ [[ $systemdutildir ]] && return 255
|
||||
+
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -69,6 +70,7 @@ install() {
|
||||
$systemdsystemunitdir/systemd-vconsole-setup.service \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-ask-password-console.path \
|
||||
+ $systemdsystemunitdir/sysinit.target.wants/systemd-vconsole-setup.service \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-journald.service \
|
||||
$systemdsystemunitdir/sockets.target.wants/systemd-initctl.socket \
|
||||
$systemdsystemunitdir/sockets.target.wants/systemd-shutdownd.socket \
|
||||
@@ -77,7 +79,6 @@ install() {
|
||||
$systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-udev.service \
|
||||
$systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \
|
||||
- $systemdsystemunitdir/local-fs.target.wants/tmp.mount \
|
||||
$systemdsystemunitdir/ctrl-alt-del.target \
|
||||
$systemdsystemunitdir/single.service \
|
||||
$systemdsystemunitdir/syslog.socket \
|
||||
@@ -101,6 +102,17 @@ install() {
|
||||
|
||||
dracut_install journalctl systemctl echo
|
||||
|
||||
+ if [[ $hostonly ]]; then
|
||||
+ dracut_install -o /etc/systemd/journald.conf \
|
||||
+ /etc/systemd/system.conf \
|
||||
+ /etc/hostname \
|
||||
+ /etc/machine-id \
|
||||
+ /etc/vconsole.conf \
|
||||
+ /etc/locale.conf
|
||||
+ else
|
||||
+ > "$initdir/etc/machine-id"
|
||||
+ fi
|
||||
+
|
||||
ln -fs $systemdutildir/systemd "$initdir/init"
|
||||
|
||||
rm -f "${initdir}${systemdsystemunitdir}/emergency.service"
|
||||
@@ -136,6 +148,5 @@ install() {
|
||||
mkdir -p "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants"
|
||||
ln -s ../dracut-pre-pivot.service "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants/dracut-pre-pivot.service"
|
||||
|
||||
- > "$initdir/etc/machine-id"
|
||||
}
|
||||
|
79
0060-systemd-remove-old-udev-services.patch
Normal file
79
0060-systemd-remove-old-udev-services.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From 55cb17c677d6e4658b4356cf5a594acfec01366b Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 21 Jun 2012 10:50:01 +0200
|
||||
Subject: [PATCH] systemd: remove old udev services
|
||||
|
||||
---
|
||||
modules.d/98systemd/dracut-initqueue.service | 4 ++--
|
||||
modules.d/98systemd/dracut-pre-trigger.service | 6 +++---
|
||||
modules.d/98systemd/dracut-pre-udev.service | 2 +-
|
||||
modules.d/98systemd/module-setup.sh | 11 +----------
|
||||
4 files changed, 7 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service
|
||||
index 4f86eaf..31fe9e4 100644
|
||||
--- a/modules.d/98systemd/dracut-initqueue.service
|
||||
+++ b/modules.d/98systemd/dracut-initqueue.service
|
||||
@@ -10,8 +10,8 @@
|
||||
[Unit]
|
||||
Description=Dracut initqueue hook
|
||||
DefaultDependencies=no
|
||||
-After=systemd-udev-trigger.service udev-trigger.service
|
||||
-Wants=systemd-udev-trigger.service udev-trigger.service
|
||||
+After=systemd-udev-trigger.service
|
||||
+Wants=systemd-udev-trigger.service
|
||||
|
||||
[Service]
|
||||
Environment=HOME=/
|
||||
diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service
|
||||
index 234839c..b06d17f 100644
|
||||
--- a/modules.d/98systemd/dracut-pre-trigger.service
|
||||
+++ b/modules.d/98systemd/dracut-pre-trigger.service
|
||||
@@ -10,9 +10,9 @@
|
||||
[Unit]
|
||||
Description=Dracut pre-trigger hook
|
||||
DefaultDependencies=no
|
||||
-Before=systemd-udev-trigger.service udev-trigger.service dracut-initqueue.service
|
||||
-After=dracut-pre-udev.service systemd-udev.service udev.service
|
||||
-Wants=dracut-pre-udev.service systemd-udev.service udev.service
|
||||
+Before=systemd-udev-trigger.service dracut-initqueue.service
|
||||
+After=dracut-pre-udev.service systemd-udev.service
|
||||
+Wants=dracut-pre-udev.service systemd-udev.service
|
||||
|
||||
[Service]
|
||||
Environment=HOME=/
|
||||
diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service
|
||||
index 11be61b..d867b38 100644
|
||||
--- a/modules.d/98systemd/dracut-pre-udev.service
|
||||
+++ b/modules.d/98systemd/dracut-pre-udev.service
|
||||
@@ -10,7 +10,7 @@
|
||||
[Unit]
|
||||
Description=Dracut pre-udev hook
|
||||
DefaultDependencies=no
|
||||
-Before=systemd-udev.service udev.service dracut-pre-trigger.service
|
||||
+Before=systemd-udev.service dracut-pre-trigger.service
|
||||
After=dracut-cmdline.service
|
||||
Wants=dracut-cmdline.service
|
||||
|
||||
diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh
|
||||
index 4c68a9a..a6e2365 100755
|
||||
--- a/modules.d/98systemd/module-setup.sh
|
||||
+++ b/modules.d/98systemd/module-setup.sh
|
||||
@@ -85,16 +85,7 @@ install() {
|
||||
$systemdsystemunitdir/syslog.target \
|
||||
$systemdsystemunitdir/initrd-switch-root.target \
|
||||
$systemdsystemunitdir/initrd-switch-root.service \
|
||||
- $systemdsystemunitdir/umount.target \
|
||||
- $systemdsystemunitdir/udev-control.socket \
|
||||
- $systemdsystemunitdir/udev-kernel.socket \
|
||||
- $systemdsystemunitdir/udev.service \
|
||||
- $systemdsystemunitdir/udev-settle.service \
|
||||
- $systemdsystemunitdir/udev-trigger.service \
|
||||
- $systemdsystemunitdir/basic.target.wants/udev.service \
|
||||
- $systemdsystemunitdir/basic.target.wants/udev-trigger.service \
|
||||
- $systemdsystemunitdir/sockets.target.wants/udev-control.socket \
|
||||
- $systemdsystemunitdir/sockets.target.wants/udev-kernel.socket
|
||||
+ $systemdsystemunitdir/umount.target
|
||||
|
||||
for i in /etc/systemd/*.conf; do
|
||||
dracut_install "$i"
|
@ -0,0 +1,24 @@
|
||||
From cc51bc6fdbe3962d5ca81808ed685ddc41770935 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 21 Jun 2012 10:50:36 +0200
|
||||
Subject: [PATCH] systemd/dracut-pre-pivot.sh: copy service files to
|
||||
/run/systemd/system
|
||||
|
||||
and remove the last info, so that the journal is not restarted again.
|
||||
---
|
||||
modules.d/98systemd/dracut-pre-pivot.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh
|
||||
index 38e9c3c..89d7e6d 100755
|
||||
--- a/modules.d/98systemd/dracut-pre-pivot.sh
|
||||
+++ b/modules.d/98systemd/dracut-pre-pivot.sh
|
||||
@@ -45,6 +45,7 @@ udevadm info --cleanup-db
|
||||
[ -h /dev/root ] && rm -f /dev/root
|
||||
|
||||
getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root"
|
||||
-info "Switching root"
|
||||
+
|
||||
+cp -avr /lib/systemd/system/dracut*.service /run/systemd/system/
|
||||
|
||||
export -p > /dracut-state.sh
|
12
dracut.spec
12
dracut.spec
@ -10,7 +10,7 @@
|
||||
|
||||
Name: dracut
|
||||
Version: 019
|
||||
Release: 57.git20120620%{?dist}
|
||||
Release: 62.git20120621%{?dist}
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
@ -80,6 +80,11 @@ Patch53: 0053-base-dracut-lib.sh-change-output-of-info-and-warn-fo.patch
|
||||
Patch54: 0054-base-dracut-lib.sh-for-systemd-start-emergency.servi.patch
|
||||
Patch55: 0055-dracut.conf.d-fedora.conf.example-make-systemd-defau.patch
|
||||
Patch56: 0056-dracut.spec-require-systemd-44-15.patch
|
||||
Patch57: 0057-dracut-functions.sh-use-ln-r-instead-of-shell-functi.patch
|
||||
Patch58: 0058-systemd-remove-unneeded-systemd-services.patch
|
||||
Patch59: 0059-fixed-i18n-for-systemd-and-include-more-config-files.patch
|
||||
Patch60: 0060-systemd-remove-old-udev-services.patch
|
||||
Patch61: 0061-systemd-dracut-pre-pivot.sh-copy-service-files-to-ru.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
@ -401,6 +406,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%dir /var/lib/dracut/overlay
|
||||
|
||||
%changelog
|
||||
* Thu Jun 21 2012 Harald Hoyer <harald@redhat.com> 019-62.git20120621
|
||||
- do not require pkg-config for systemd
|
||||
- i18n fixes
|
||||
- less systemd services in the initramfs
|
||||
|
||||
* Thu Jun 21 2012 Harald Hoyer <harald@redhat.com> 019-57.git20120620
|
||||
- systemd is now the default init in the initramfs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user