5414ff dracut-019-62.git20120621

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